/* static/css/users_page.css - Neutral Palette Version */

/* Default dark text color */
:root {
  --text-dark: #212529;
  --text-muted: #6c757d;
  --border-light: #dee2e6;
  --bg-light-sand: #FAF8F3; /* Very light sand */
  --bg-soft-peach: #FFF5EE; /* Soft peach/seashell */
  --border-neutral: #E0D8C7; /* Neutral beige/sand border */
  --accent-dark-sand: #A89F8E; /* Darker sand for accents */
}

body {
  background-color: #fefdfb !important; /* Linen - Added !important just in case Bootstrap overrides */
}

/* ======= HERO SECTION ======= */
.hero-section {
  /* --- NEW Neutral Gradient --- */
  /* Example: Soft Peach fading to Light Sand */
  background: radial-gradient(circle at 50% 40%, #FFEDDA 0%, #F5F1E8 70%, #FFFFFF 100%);
  color: var(--text-dark); /* Use dark text */
  padding: 80px 15px;
  border-radius: 0; /* Remove radius or adjust as desired */
  margin-bottom: 40px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Softer shadow */
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-neutral); /* Add subtle border */
}

.hero-section h1,
.hero-section p {
  color: var(--text-dark) !important; /* Ensure text is dark */
  text-shadow: none; /* Remove text shadow */
}

/* Remove the decorative circle */
.hero-section::before {
  content: none;
}

.hero-section h1 {
  font-weight: 600; /* Slightly less bold */
}

.hero-section p {
  opacity: 1.0; /* Full opacity */
  max-width: 750px;
  margin: 0 auto;
  color: var(--text-muted) !important; /* Use muted color for lead */
}

/* Button styling for Hero */
.hero-section .btn-primary {
    background-color: var(--text-dark);
    border-color: var(--text-dark);
    color: #fff;
}
.hero-section .btn-primary:hover {
    background-color: #495057; /* Darker grey on hover */
    border-color: #495057;
}
.hero-section .btn-outline-secondary {
    color: var(--text-dark);
    border-color: var(--text-dark);
}
.hero-section .btn-outline-secondary:hover {
    background-color: var(--text-dark);
    color: #fff;
}


/* ======= LINKS ======= */
.tiktok-link { /* Using standard Bootstrap link color might be better */
  color: var(--bs-link-color, #0d6efd) !important; /* Default Bootstrap blue or fallback */
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.tiktok-link:hover {
  text-decoration: underline;
  color: var(--bs-link-hover-color, #0a58ca) !important; /* Default Bootstrap hover */
}

/* ======= FILTER PANEL ======= */
.filter-panel .filter-toggle-btn {
  border-radius: 20px;
  padding: 8px 20px;
  font-weight: 500;
  /* --- Neutral Button --- */
  color: var(--text-dark);
  border-color: var(--text-dark);
  background: transparent;
  transition: all 0.2s ease;
}

.filter-panel .filter-toggle-btn:hover {
  background-color: var(--text-dark);
  color: #fff;
}

.filter-panel .filter-toggle-btn .toggle-icon {
  transition: transform 0.3s ease;
  display: inline-block;
}

.filter-panel .filter-toggle-btn[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

.filter-card {
  border: 1px solid var(--border-neutral); /* Neutral border */
  background-color: var(--bg-light-sand); /* Light sand background */
}

.filter-title {
  color: var(--text-dark); /* Dark text title */
  font-weight: bold;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.apply-filters-btn {
  /* --- Dark Button --- */
  background-color: var(--text-dark);
  border-color: var(--text-dark);
  color: #fff;
}

.apply-filters-btn:hover {
  background-color: #495057; /* Darker grey */
  border-color: #495057;
}

/* ======= CARDS AND DETAILS ======= */
/* Style for the main card holding the table - gets border removed later */
.card.shadow-sm {
  border-radius: 10px; /* Slightly less radius */
  border: 1px solid var(--border-light); /* Default border - overridden below */
  box-shadow: 0 4px 8px rgba(0,0,0,0.05); /* Softer shadow */
}
.card .card-header {
    background-color: #f8f9fa; /* Standard light grey */
    border-bottom: 1px solid var(--border-light); /* Default border */
}


/* Details Row itself (when row is expanded) */
.details-row {
  background-color: #f8f9fa; /* Light grey background */
  padding: 20px;
  margin: 0;
  border-top: 1px solid var(--border-light);
}

/* Cards within the details row */
.details-row .card {
  transition: box-shadow 0.3s ease;
  border-radius: 0.375rem; /* Standard Bootstrap radius */
  border: 1px solid var(--border-light); /* Add border */
}

.details-row .card:hover {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08); /* Subtle dark shadow */
}

.details-row .card-header {
  background-color: #e9ecef; /* Slightly darker grey header */
  border-bottom: 1px solid var(--border-light);
  color: var(--text-dark);
}
.details-row .card-header h6 { /* Ensure header text is dark */
    color: inherit;
}

/* Remove potential top border from the main DataTables wrapper */
#usersTable_wrapper.dataTables_wrapper {
 border-top: none !important;
 padding-top: 0 !important; /* Also remove padding just in case */
}

/* If using newer DT layout, might be needed */
.dataTables_wrapper .dt-layout-row {
   /* Reset padding/margin that might cause visual lines */
   padding-top: 0.5rem; /* Or adjust as needed */
   padding-bottom: 0.5rem;
   margin-top: 0;
   margin-bottom: 0;
   border: none; /* Remove borders from layout rows */
}


.details-label {
  font-weight: 600;
  color: #495057;
  min-width: 120px;
  display: inline-block;
}

.details-value {
  color: var(--text-dark);
  font-size: 0.95rem;
}

/* Remove bottom border from main card header if needed */
/* .card > .card-header {
     border-bottom: none;
} */

/* Redefine text-purple */
.text-purple {
  color: var(--accent-dark-sand) !important; /* Redefined to dark sand */
}

.bio-container {
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  margin-top: 1rem;
}

.bio-text {
  background-color: #fff; /* White background for bio */
  padding: 15px;
  border-radius: 0.375rem;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
  border-left: 3px solid var(--border-neutral); /* Neutral border */
  color: #495057;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
}

/* ======= TABLES ======= */
.table > :not(caption) > * > * { /* Target table cells more specifically */
    background-color: transparent; /* Remove default BS striping if applying custom */
}

.table-striped tbody tr:nth-of-type(odd) {
 background-color: #fefdfb !important; /* New very light stripe color - Added !important to ensure override */
}

.table-hover tbody tr:hover {
  background-color: var(--bg-soft-peach); /* Soft peach hover */
}

/* === REMOVED CONFLICTING BORDER RULE === */
.table-responsive {
  border-radius: 8px; /* Match card radius */
  overflow: hidden;
  /* border: 1px solid var(--border-light); */ /* REMOVED THIS LINE */
}

/* ======= DT Control Icon ======= */
td.dt-control {
  cursor: pointer;
  text-align: center;
}

td.dt-control:before {
  content: '+';
  background-color: var(--text-muted); /* Muted grey background */
  color: white;
  border-radius: 50%;
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

tr.shown td.dt-control:before {
  content: '-';
  background-color: var(--text-dark); /* Dark background when open */
}

/* ======= SEARCH BOX ======= */
.dataTables_filter input[type="search"] {
  width: 350px !important;
  padding: 8px 12px !important;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
}

.dataTables_filter input[type="search"]:focus {
  border-color: var(--text-dark); /* Dark border on focus */
  box-shadow: 0 0 0 0.2rem rgba(33, 37, 41, 0.25); /* Dark shadow */
}
.dataTables_filter label {
    font-weight: 500 !important;
    color: var(--text-muted) !important;
}

/* hide the top border from the wrapper and table element itself */
.dataTables_wrapper .table-responsive,
.dataTables_wrapper table.dataTable,
.dataTables_wrapper .table{
    border-top: 0 !important;
}


/* ======= FOOTER ======= */
.footer {
  text-align: center;
  color: var(--text-muted);
  margin-top: 60px;
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 1px solid var(--border-light);
  background-color: transparent; /* Remove grey background */
}
.footer a {
    color: var(--text-muted);
}
.footer a:hover {
    color: var(--text-dark);
}


/* --- CSS Rules to Remove Table Borders --- */
/* Placed at the end to maximize override potential */

/* Target the card containing the table */
.container > .card.shadow-sm,
#usersTable_wrapper .card,
.card:has(#usersTable) {
    border: none !important;
    box-shadow: none !important;
}

/* Remove ALL borders from general table elements */
#usersTable,
#usersTable tbody,
#usersTable tr,
#usersTable td { /* Exclude th and thead initially */
    border: none !important;
    box-shadow: none !important;
}

/* Force removal of borders specifically on thead and th */
#usersTable thead,
#usersTable thead tr,
#usersTable thead th {
    border-style: none !important;
    border-width: 0 !important;
    border-bottom-width: 0 !important; /* Explicitly target bottom */
    border: none !important;           /* Catch-all */
    box-shadow: none !important;       /* Remove potential shadow line */
    --bs-table-border-color: transparent !important; /* Override BS variable */
}

/* Override common Bootstrap/DataTables thead/th selectors */
.table>thead {
    border: none !important;
}
.table>thead>tr>th {
     border-bottom-width: 0 !important;
     border: none !important;
}
#usersTable_wrapper table.dataTable thead th,
#usersTable_wrapper table.dataTable thead td {
    border-bottom: none !important; /* DT specific */
    border: none !important;
}

/* Override Bootstrap 5 specific base table/cell border rules */
.table { /* Target the .table class */
     --bs-table-border-color: transparent !important;
     border: none !important;
}
.table>:not(caption)>*>* { /* Target BS5 cells */
    border-bottom-width: 0 !important;
    border: none !important;
    box-shadow: none !important;
}


/* --- End CSS Rules --- */