/* वंशावली / Peoples Table – aligned with landing (/) green theme
   Uses: var(--primary), var(--primary-dark), var(--dark), var(--border), var(--light)
*/

/* ========== SUPER SEARCH CAPSULE ========== */
.super-search-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.super-search-card {
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  overflow: visible;
}

.super-search-card .select2-container--default .select2-selection--single {
  border: none !important;
  background-color: transparent !important;
  height: 70px !important;
  display: flex !important;
  align-items: center !important;
  box-shadow: none !important;
}

.super-search-card .select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 15px !important;
  padding-right: 35px !important;
  width: 100% !important;
}

.super-search-card .col-lg-2 {
  border-right: 1px solid #f1f5f9;
}

.super-search-input {
  border: none !important;
  background-color: transparent !important;
  height: 70px !important;
  font-size: 1.15rem !important;
  padding-left: 20px !important;
  box-shadow: none !important;
}

.super-input-group {
  background: #f8fafc;
  border-radius: 12px;
  padding: 2px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.super-input-group:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(22, 163, 74, 0.1);
}

.super-search-btn {
  border-radius: 12px !important;
  height: 60px;
  padding: 0 40px !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.25);
  transition: all 0.3s ease;
}

.super-search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(22, 163, 74, 0.35);
  filter: brightness(1.1);
}

.search-estimate-overlay {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
  border: 1px solid #f1f5f9;
  animation: searchPop 0.2s ease-out;
}

@keyframes searchPop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hover-opacity-100:hover { opacity: 1 !important; }

/* ========== SEARCH RESULTS CARD ========== */
.pt-search-results-card {
  border-radius: 16px;
  border-width: 2px;
}

.pt-search-results-card .card-body {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.06) 0%, rgba(22, 163, 74, 0.02) 100%);
  border-radius: 14px;
}

/* ========== TABLE CARD ========== */
.pt-table-card {
  border: 2px solid var(--border, #e2e8f0);
  border-radius: 16px;
  overflow: hidden;
}

.pt-table-card .card-body { padding: 0; }

.pt-table-scroll {
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: thin;
  scrollbar-color: rgba(22, 163, 74, 0.5) var(--border, #e2e8f0);
}

.pt-table-scroll::-webkit-scrollbar { height: 8px; }
.pt-table-scroll::-webkit-scrollbar-track { background: var(--light, #f8fafc); border-radius: 4px; }
.pt-table-scroll::-webkit-scrollbar-thumb { background: rgba(22, 163, 74, 0.4); border-radius: 4px; }
.pt-table-scroll::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ========== TABLE ========== */
.pt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.pt-table th,
.pt-table td {
  padding: 0.65rem 1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border, #e2e8f0);
  color: var(--dark, #0f172a);
}

.pt-table th {
  background: linear-gradient(180deg, var(--light, #f8fafc) 0%, #fff 100%);
  font-weight: 600;
  color: var(--dark, #0f172a);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: 0 1px 0 var(--border, #e2e8f0);
}

.pt-table th[data-col] {
  cursor: pointer;
  user-select: none;
}

.pt-table th[data-col]:hover {
  color: var(--primary);
}

.pt-table tbody tr {
  transition: background 0.2s;
}

.pt-table tbody tr:hover {
  background: rgba(22, 163, 74, 0.06);
}

.pt-table tbody tr:last-child td { border-bottom: none; }

.pt-table a {
  color: var(--primary);
  text-decoration: none;
}

.pt-table a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Avatar / photo column */
.pt-table .pt-th-avatar {
  width: 48px;
  text-align: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.pt-table .pt-avatar-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.pt-table .pt-avatar {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--border, #e2e8f0);
}
.pt-table .pt-avatar-icon {
  font-size: 1.25rem;
  color: var(--primary);
}
.pt-table .pt-avatar-icon.pt-avatar-icon-f {
  color: #ec4899;
}

.pt-table .btn-group-vertical { min-width: 110px; }
.pt-table .btn-group-vertical .btn { font-size: 0.8rem; }

/* ========== SELECT2 PREMIUM OVERRIDES ========== */
.premium-dropdown {
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 15px 40px rgba(0,0,0,0.12) !important;
  margin-top: 8px !important;
  overflow: hidden !important;
  background: #fff !important;
}

.premium-dropdown .select2-results__option {
  padding: 8px 12px !important;
  margin: 4px 8px !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
}

.premium-dropdown .select2-results__option--highlighted[aria-selected] {
  background-color: #f1f5f9 !important;
  color: var(--dark) !important;
}

/* Ensure icons are visible in the selection box */
.select2-container .select2-selection--single .select2-selection__rendered {
  display: block !important;
  overflow: visible !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 60px !important;
  width: 40px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #64748b transparent transparent transparent !important;
  border-width: 6px 4px 0 4px !important;
}

/* Column widths for scanability */
.pt-table th:nth-child(1), .pt-table td:nth-child(1) { width: 1%; white-space: nowrap; }
.pt-table th:nth-child(2), .pt-table td:nth-child(2) { min-width: 140px; }
.pt-table th:nth-child(3), .pt-table td:nth-child(3) { width: 1%; white-space: nowrap; }
.pt-table th:nth-child(9), .pt-table td:nth-child(9) { white-space: nowrap; }

/* ========== PAGINATION ========== */
.peoples-table-page .pagination .page-link {
  border-radius: 10px;
  margin: 0 2px;
  border: 2px solid var(--border, #e2e8f0);
  color: var(--dark, #0f172a);
  padding: 0.5rem 0.85rem;
}

.peoples-table-page .pagination .page-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.peoples-table-page .pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.peoples-table-page .pagination .page-item.disabled .page-link {
  color: var(--gray, #64748b);
  border-color: var(--border, #e2e8f0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .pt-search-form .input-group .btn { padding: 0.5rem 0.75rem; }
  .pt-table th, .pt-table td { padding: 0.5rem 0.65rem; font-size: 0.85rem; }
  .pt-table .btn-group-vertical .btn { font-size: 0.75rem; padding: 0.35rem 0.5rem; }
}
