/* TREVOO + Joxi integration overrides */

:root {
  --trevoo-primary: #6a0dad;
  --trevoo-primary-dark: #4b0082;
  --trevoo-primary-light: #8b3dcc;
  --bs-primary: #6a0dad;
  --bs-primary-rgb: 106, 13, 173;
}

.default-btn,
.btn-primary {
  background-color: var(--trevoo-primary) !important;
  border-color: var(--trevoo-primary) !important;
}

.default-btn:hover,
.btn-primary:hover {
  background-color: var(--trevoo-primary-dark) !important;
  border-color: var(--trevoo-primary-dark) !important;
}

.text-primary {
  color: var(--trevoo-primary) !important;
}

.bg-linear {
  background: linear-gradient(90deg, var(--trevoo-primary), var(--trevoo-primary-light)) !important;
}

/* Header */
.trevoo-header-logo {
  max-height: 36px;
  width: auto;
}

.trevoo-tickets-link {
  font-size: 1.25rem;
  color: #1f2937 !important;
  line-height: 1;
  padding: 0.5rem !important;
}

.trevoo-avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--trevoo-primary), var(--trevoo-primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.trevoo-admin-name {
  font-size: 0.95rem !important;
  margin-bottom: 0 !important;
}

/* Sidebar brand + FA icons in nav */
.trevoo-brand-link {
  color: #1f2937 !important;
}

.trevoo-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--trevoo-primary), var(--trevoo-primary-light));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.side-menu-area .trevoo-nav-icon {
  width: 50px;
  height: 50px;
  line-height: 50px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 0 20px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--trevoo-primary);
  font-size: 1.1rem;
}

.side-menu-area .trevoo-nav-icon i {
  line-height: 1;
}

.side-menu-area .mm-active > a.box-style .trevoo-nav-icon,
.side-menu-area a.box-style.active .trevoo-nav-icon {
  background: linear-gradient(135deg, var(--trevoo-primary), var(--trevoo-primary-light));
  color: #fff;
}

.side-menu-area .sidemenu-nav-second-level li.active > a,
.side-menu-area .sidemenu-nav-second-level li.active a {
  color: var(--trevoo-primary) !important;
}

/* Content area */
.trevoo-content-area {
  padding: 0 0 1.5rem;
}

.trevoo-page-subtitle {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.trevoo-footer {
  padding: 1rem 0 1.5rem;
  color: #9ca3af;
  font-size: 0.85rem;
}

/* Joxi card helpers for admin pages */
.trevoo-panel {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  border: 1px solid #eef2f7;
  overflow: hidden;
}

.trevoo-panel-body {
  padding: 1.5rem;
}

.trevoo-panel-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #eef2f7;
  background: #fafbfc;
}

/* Dashboard charts */
.main-content-wrap .card {
  border: 1px solid #eef2f7;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.main-content-wrap .apex-toolbar .btn.active {
  background: var(--trevoo-primary) !important;
  border-color: var(--trevoo-primary) !important;
  color: #fff !important;
}

/* DataTables — ensure labels and info text are dark/readable */
.dataTables_wrapper .dataTables_length label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: #374151 !important;
}
.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  color: #374151 !important;
}

/* Nav tabs — force readable dark text on inactive tabs
   (Joxi body sets color:#67748e which gives very low contrast on #f8f9fa) */
.trevoo-content-area .modern-nav-tabs .nav-link:not(.active),
.trevoo-content-area .nav-tabs .nav-link:not(.active) {
  color: #4a5568 !important;
}

/* Normalise the length select — Joxi sets .form-control to 60px height */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_length .form-select,
.dataTables_wrapper .dataTables_length .form-control {
  width: auto !important;
  min-width: 70px !important;
  height: auto !important;
  padding: 0.3rem 1.75rem 0.3rem 0.6rem !important;
  font-size: 0.875rem !important;
  border-radius: 6px !important;
  background-color: #f8faff !important;
  border: 1px solid #e5e7eb !important;
  display: inline-block !important;
  color: #374151 !important;
}

.dataTables_wrapper .dataTables_filter input {
  height: auto !important;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  color: #374151 !important;
  background-color: #fff !important;
}
.dataTables_wrapper .dataTables_filter input::placeholder {
  color: #9ca3af !important;
  opacity: 1 !important;
}

/* Pagination buttons */
.dataTables_wrapper .dataTables_paginate .paginate_button {
  color: #374151 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: #9ca3af !important;
}
.dataTables_wrapper .dataTables_paginate .page-link,
.dataTables_wrapper .dataTables_paginate .paginate_button > a,
.dataTables_wrapper .dataTables_paginate .paginate_button > span {
  color: #374151 !important;
}

table.dataTable thead th {
  background: #f8fafc !important;
  color: #374151 !important;
  border-bottom: 1px solid #e5e7eb !important;
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Legacy gradient page wrappers — neutralize inside Joxi shell */
.trevoo-content-area .users-container,
.trevoo-content-area .reports-container {
  background: transparent !important;
  min-height: auto !important;
  padding: 0 !important;
}

.trevoo-content-area .users-card,
.trevoo-content-area .reports-card:not(.stat-card) {
  background: #fff !important;
  backdrop-filter: none !important;
  border: 1px solid #eef2f7 !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06) !important;
}

.trevoo-content-area .users-header,
.trevoo-content-area .reports-header {
  background: linear-gradient(135deg, var(--trevoo-primary), var(--trevoo-primary-dark)) !important;
  border-radius: 16px 16px 0 0 !important;
  padding: 1.25rem 1.5rem !important;
}

.trevoo-content-area .modern-nav-tabs .nav-link.active {
  background: linear-gradient(135deg, var(--trevoo-primary), var(--trevoo-primary-dark)) !important;
}

.trevoo-content-area table.dataTable thead th,
.trevoo-content-area .table thead th {
  background: #f8fafc !important;
  color: #374151 !important;
}

.trevoo-content-area .filter-select:focus,
.trevoo-content-area .filter-input:focus {
  border-color: var(--trevoo-primary) !important;
  box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.12) !important;
}

.trevoo-content-area .user-card.selected {
  border-color: var(--trevoo-primary) !important;
}

.trevoo-content-area .action-btn.view {
  background: linear-gradient(135deg, var(--trevoo-primary), var(--trevoo-primary-dark)) !important;
}

/* Admob toggle — keep working with style.css */
.trevoo-content-area .onOffSwitch .switch input:checked + .slider {
  background-color: var(--trevoo-primary);
}

/* Blogs */
.trevoo-blogs-toolbar .btn-primary {
  border-radius: 0.5rem !important;
  padding: 0.5rem 0.9rem !important;
  white-space: nowrap;
}

/* ============================================================
   SIDEBAR — TREVOO purple active states (override Joxi green)
   ============================================================ */
.side-menu-area .sidemenu-nav-second-level li.active > a,
.side-menu-area .sidemenu-nav-second-level li.active a,
.side-menu-area .sidebar-menu .sidemenu-nav-second-level li.active .menu-title {
  color: var(--trevoo-primary) !important;
}

.side-menu-area .mm-active > a.has-arrow .menu-title,
.side-menu-area a.box-style.active .menu-title {
  color: var(--trevoo-primary) !important;
}

/* ============================================================
   GLOBAL LEGACY PAGE NORMALIZATION (all admin content pages)
   ============================================================ */
.trevoo-content-area .container-fluid {
  padding-left: 0;
  padding-right: 0;
}

/* Remove full-viewport gradient wrappers */
.trevoo-content-area [class*="-container"]:not(.table-container):not(.search-container):not(.comments-container):not(.filter-chips-container):not(.media-carousel-container):not(.audio-player-container):not(.video-player-container):not(.action-buttons-container):not(.image-upload-container):not(.background-image-container):not(.profile-image-container):not(.tabs-container):not(.verification-table-container):not(.posts-datatable-container),
.trevoo-content-area .modern-container,
.trevoo-content-area .support-tickets-dashboard {
  background: transparent !important;
  min-height: auto !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* White panel cards */
.trevoo-content-area [class*="-card"]:not(.stat-card):not(.user-card):not(.room-card):not(.post-card):not(.reel-card):not(.story-card):not(.welcome-card):not(.artist-card):not(.reports-card):not(.deletions-card):not(.tickets-card),
.trevoo-content-area .card-box-style,
.trevoo-content-area .table-container,
.trevoo-content-area .notifications-header,
.trevoo-content-area .filter-bar {
  background: #fff !important;
  backdrop-filter: none !important;
  border: 1px solid #eef2f7 !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06) !important;
}

/* Hero / page headers with colored gradient */
.trevoo-content-area .posts-header-modern,
.trevoo-content-area .reels-header-modern,
.trevoo-content-area .users-header,
.trevoo-content-area .reports-header,
.trevoo-content-area .music-header,
.trevoo-content-area .submissions-header,
.trevoo-content-area .dashboard-header,
.trevoo-content-area .tab-header-modern,
.trevoo-content-area .profile-header-modern,
.trevoo-content-area .page-header-modern,
.trevoo-content-area .stories-page-header,
.trevoo-content-area .rooms-page-header,
.trevoo-content-area .restrictions-header,
.trevoo-content-area .rooms-header,
.trevoo-content-area .room-header,
.trevoo-content-area .user-detail-header,
.trevoo-content-area .verification-header,
.trevoo-content-area .stories-header,
.trevoo-content-area .delete-requests-header {
  background: linear-gradient(135deg, var(--trevoo-primary), var(--trevoo-primary-dark)) !important;
  color: #fff !important;
  border-radius: 16px !important;
  border: none !important;
}

/* Joxi sets h1-h6 color explicitly which overrides CSS inheritance —
   force white on ALL children of every colored page header */
.trevoo-content-area .posts-header-modern *,
.trevoo-content-area .reels-header-modern *,
.trevoo-content-area .users-header *,
.trevoo-content-area .reports-header *,
.trevoo-content-area .music-header *,
.trevoo-content-area .submissions-header *,
.trevoo-content-area .dashboard-header *,
.trevoo-content-area .tab-header-modern *,
.trevoo-content-area .profile-header-modern *,
.trevoo-content-area .page-header-modern *,
.trevoo-content-area .stories-page-header *,
.trevoo-content-area .rooms-page-header *,
.trevoo-content-area .restrictions-header *,
.trevoo-content-area .rooms-header *,
.trevoo-content-area .room-header *,
.trevoo-content-area .user-detail-header *,
.trevoo-content-area .verification-header *,
.trevoo-content-area .stories-header *,
.trevoo-content-area .delete-requests-header *,
.trevoo-content-area .search-panel-header *,
.trevoo-content-area .panel-header * {
  color: #fff !important;
}

/* Exception: .stat-item boxes have white backgrounds (admin-modern.css) — restore dark text */
.trevoo-content-area [class*="-header"] .stat-item,
.trevoo-content-area [class*="-header"] .stat-item * {
  color: #292d32 !important;
}

/* Dropdown menus inside header areas must stay dark regardless of the wildcard above */
.trevoo-content-area .posts-header-modern .dropdown-menu,
.trevoo-content-area .posts-header-modern .dropdown-menu *,
.trevoo-content-area .reels-header-modern .dropdown-menu,
.trevoo-content-area .reels-header-modern .dropdown-menu *,
.trevoo-content-area [class*="-header-modern"] .dropdown-menu,
.trevoo-content-area [class*="-header-modern"] .dropdown-menu *,
.trevoo-content-area [class*="-header"] .dropdown-menu,
.trevoo-content-area [class*="-header"] .dropdown-menu * {
  color: #292d32 !important;
}
.trevoo-content-area [class*="-header"] .dropdown-menu .dropdown-item:hover,
.trevoo-content-area [class*="-header"] .dropdown-menu .dropdown-item:focus {
  color: var(--trevoo-primary) !important;
  background-color: #f8f9fa !important;
}

/* Remap legacy accent buttons and tabs */
.trevoo-content-area .add-btn,
.trevoo-content-area .btn-primary-gradient,
.trevoo-content-area .modern-nav-tabs .nav-link.active,
.trevoo-content-area .filter-chip.active,
.trevoo-content-area .action-btn.view,
.trevoo-content-area .btn-save-modern,
.trevoo-content-area .submit-btn-modern {
  background: linear-gradient(135deg, var(--trevoo-primary), var(--trevoo-primary-dark)) !important;
  border-color: var(--trevoo-primary) !important;
  color: #fff !important;
}

.trevoo-content-area .welcome-card,
.trevoo-content-area .artist-card {
  background: linear-gradient(135deg, var(--trevoo-primary), var(--trevoo-primary-dark)) !important;
}

/* Force white text on all coloured stat/welcome cards — overrides Joxi h1-h6 colour */
.trevoo-content-area .welcome-card,
.trevoo-content-area .welcome-card *,
.trevoo-content-area .artist-card,
.trevoo-content-area .artist-card *,
.trevoo-content-area .reports-card,
/* .trevoo-content-area .reports-card *, */
.trevoo-content-area .deletions-card,
.trevoo-content-area .deletions-card *,
.trevoo-content-area .tickets-card,
.trevoo-content-area .tickets-card * {
  color: #fff !important;
}

/* Tables */
.trevoo-content-area table.dataTable thead th,
.trevoo-content-area .table thead th,
.trevoo-content-area .dataTables_wrapper table thead th {
  background: #f8fafc !important;
  color: #374151 !important;
  background-image: none !important;
}

.trevoo-content-area .table-container,
.trevoo-content-area .posts-datatable-container,
.trevoo-content-area .verification-table-container {
  overflow: hidden;
  padding: 0 !important;
}

.trevoo-content-area .table-container .table,
.trevoo-content-area .posts-datatable-container .table {
  margin-bottom: 0;
}

/* Forms and inputs */
.trevoo-content-area .form-control:focus,
.trevoo-content-area .form-select:focus,
.trevoo-content-area .filter-select:focus,
.trevoo-content-area .filter-input:focus,
.trevoo-content-area .search-input:focus {
  border-color: var(--trevoo-primary) !important;
  box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.12) !important;
}

/* Section spacing */
.trevoo-content-area .section {
  padding: 0;
}

.trevoo-content-area .section-header h1,
.trevoo-content-area .page-title h3 {
  font-weight: 600;
  color: #1f2937;
}

/* Stat cards on welcome page keep color variety but soften */
.trevoo-content-area .stat-card {
  border-radius: 16px !important;
  border: 1px solid #eef2f7 !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06) !important;
}

/* Interest / FAQ purple headers */
.trevoo-content-area .interest-header,
.trevoo-content-area .faq-header,
.trevoo-content-area .interest-type-header,
.trevoo-content-area .faq-type-header {
  background: linear-gradient(135deg, var(--trevoo-primary), var(--trevoo-primary-dark)) !important;
}

/* User grid cards */
.trevoo-content-area .user-card {
  border-radius: 14px !important;
  border: 1px solid #eef2f7 !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
}

.trevoo-content-area .filter-toolbar {
  background: #f8fafc !important;
  border-radius: 12px !important;
  border: 1px solid #eef2f7 !important;
}

/* Modals stay functional — subtle radius match */
.trevoo-content-area .modal-content {
  border-radius: 16px !important;
  border: 1px solid #eef2f7 !important;
}

/* Page title area spacing */
.page-title-area {
  margin-bottom: 1.25rem;
}

.page-title-area .page-title h3 {
  margin-bottom: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
}

/* Content padding when no built-in container */
.trevoo-content-area > .container-fluid,
.trevoo-content-area > .row,
.trevoo-content-area > .section,
.trevoo-content-area > .support-tickets-dashboard {
  padding-left: 0;
  padding-right: 0;
}

/* Standalone auth pages (forgot / reset password) */
body.standalone-auth,
.standalone-container {
  font-family: inherit;
}

.standalone-container::before {
  background: linear-gradient(90deg, var(--trevoo-primary), var(--trevoo-primary-light)) !important;
}

.standalone-container .brand-logo,
.standalone-container .btn-primary {
  background: var(--trevoo-primary) !important;
}

.standalone-container .brand-title {
  color: var(--trevoo-primary) !important;
}

/* Shared admin page utilities */
.trevoo-icon-accent {
  color: var(--trevoo-primary) !important;
}

.dt-btn-trevoo {
  background: linear-gradient(135deg, var(--trevoo-primary), var(--trevoo-primary-light)) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  margin-right: 5px !important;
}

.webhook-payload-pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 200px;
  overflow-y: auto;
  font-size: 0.8rem;
  margin: 0;
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #eef2f7;
}

.reel-preview-video {
  max-height: 300px;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.blog-featured-preview {
  max-height: 200px;
}

.blog-featured-image {
  max-height: 320px;
  object-fit: cover;
}

.trevoo-content-area > .container-fluid {
  padding-bottom: 0.5rem;
}

.mw-480 {
  max-width: 480px;
}

/* Circular action buttons in DataTables — override Joxi .btn padding expansion
   and fix any broken inline width/height from server-rendered HTML */
.btn.btn-sm.rounded-circle {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}
