/* debts.css - styles specific to debts.html */

/* ========== Search Input Styling ========== */
.form-input {
  width: 100%;
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 1rem;
  border: 1px solid #212529;
  border-radius: 2rem;
  background-color: #fff;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  outline: none;
}

.form-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-input::placeholder {
  color: #6c757d;
}

.fs-16 {
  font-size: 1rem !important;
}

/* Search icon positioning */
.bi-search {
  color: #6c757d;
  z-index: 10;
}

@media (max-width: 576px) {
  .form-input {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem 0.375rem 2.25rem;
  }
}
/* ========== End Search Input Styling ========== */

/* ========== Table Styling (matching payments.css) ========== */
th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}

th.sortable .sort-indicator {
  font-size: 0.9em;
  margin-left: 4px;
  color: #888;
}

th.sorted-asc .sort-indicator {
  color: #000;
}

th.sorted-desc .sort-indicator {
  color: #000;
}

/* Optional: highlight sorted column */
th.sorted-asc, th.sorted-desc {
  background-color: #e9ecef;
}

/* Three-dot vertical icon button */
.three-dot-btn {
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  color: #333;
  vertical-align: middle;
  transition: color 0.2s;
}
.three-dot-btn:hover, .three-dot-btn:focus {
  color: #007bff;
  background: none;
}

    /* Developed by Syed Hassan Raza  
    Fiverr: https://www.fiverr.com/syedhassanr  
    Email: hassan.bscs@gmail.com  
    Project: Payments & Debtors Pages | Parents Booking Platform  
    Client: Netmedia Ltd | Will Mackenzie | © 2025   */

/* Robust dropdown menu for three-dot actions */
.dropdown-menu-actions,
.custom-dropdown-menu {
  min-width: 180px !important;
  max-width: 320px;
  font-size: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 0.5rem 0;
  background: #fff;
  z-index: 9999 !important;
  overflow: visible !important;
  display: block;
}

.dropdown-menu-actions .dropdown-item,
.custom-dropdown-menu .dropdown-item {
  padding: 0.5rem 1.25rem;
  white-space: nowrap;
  font-size: 1rem;
}

.dropdown-menu-actions .dropdown-item:hover,
.custom-dropdown-menu .dropdown-item:hover {
  background-color: #e9ecef;
  color: #212529;
}

/* Dropdown menu customizations for admin UI */
.dropdown-menu {
  min-width: 180px;
  font-size: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 0.25rem 0;
}
.dropdown-item {
  padding: 0.5rem 1.25rem;
}
.dropdown-item:active, .dropdown-item:focus {
  background-color: #e9ecef;
  color: #212529;
}

/* Fix for dropdown menu being scrollable with minimal height */
.dropdown-menu {
  max-height: none !important;
  overflow: visible !important;
  z-index: 1050;
}

/* Custom dropdown menu for action column (copied from payments.css) */
.custom-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  z-index: 9999 !important;
  padding: 0.25rem 0;
  max-height: none !important;
  overflow: visible !important;
}
.custom-dropdown-menu.show {
  display: block;
}
.custom-dropdown-menu .dropdown-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1.25rem;
  color: #212529;
  text-decoration: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}
.custom-dropdown-menu .dropdown-item:hover, .custom-dropdown-menu .dropdown-item:focus {
  background-color: #e9ecef;
  color: #212529;
}

/* Fix for dropdown menu in debts actions */
.dropdown-menu-actions {
  display: none;
  position: absolute;
  right: 0;
  z-index: 100;
  min-width: 150px;
  min-height: 80px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding: 0;
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}
.dropdown-menu-actions.show {
  display: block !important;
}
.dropdown-menu-actions .dropdown-item {
  width: 100%;
  text-align: left;
  padding: 10px 18px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 16px;
  white-space: nowrap;
}
.dropdown-menu-actions .dropdown-item:hover {
  background: #f5f5f5;
}

/* Prevent parent containers from clipping the dropdown */
.table-responsive, td, tr, tbody {
  overflow: visible !important;
}

/* Responsive table for mobile */
@media (max-width: 576px) {
  .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  /* Reduce left padding/margin of total row on mobile */
  tfoot td.fw-bold.text-end {
    padding-left: 0.5rem !important;
    margin-left: 0 !important;
  }
  td, th {
    font-size: 10px;
    max-width: 70px;
  }
  .total-debt, .fw-bold {
    font-size: 16px !important;
  }
  .total-text{
    font-size: 16px !important;
    padding-left: 40px !important;
  }
}
/* ========== End Table Styling ========== */

/* ========== Total Debt Card ========== */
.total-debt-card {
  background: #f2f2f2;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.10), 0 1.5px 4px rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 8px 32px 8px 32px;
  max-width: 340px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}
.total-debt-label {
  font-size: 1.5rem;
  color: #555;
  font-weight: 900;
  margin-bottom: 0.5rem;
}
.total-debt-amount {
  font-size: 2.1rem;
  font-weight: 900;
  color: #333;
  letter-spacing: 0.5px;
}
@media (max-width: 600px) {
  .total-debt-card {
    padding: 18px 10px 14px 10px;
    max-width: 95vw;
  }
  .total-debt-amount {
    font-size: 1.4rem;
  }
}
/* ========== End Total Debt Card ========== */

/* ========== Export Button Bottom Right ========== */
.debts-export-btn-wrapper {
  margin-top: 12px;
  margin-bottom: 8px;
  padding-right: 8px;
}
@media (max-width: 600px) {
  .debts-export-btn-wrapper {
    justify-content: center !important;
    padding-right: 0;
  }
}
/* ========== End Export Button Bottom Right ========== */ 

[type="text"] {
  background-color: #ededed;
  border: 1px solid;
  width: 82%;
  padding: 7px 10px;
}