/* =========================================================
   BERITH LAW FIRM — THEME SWITCHER STYLES
   Light (default) | Grey | Dark
   Only overrides white/light backgrounds and text colors.
   All accent colours, buttons, and brand colours are untouched.
========================================================= */

/* ---------------------------------------------------------
   1. THEME TOGGLE BUTTON & DROPDOWN
--------------------------------------------------------- */

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 1050;
}

.theme-toggle__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  padding: 0;
  line-height: 1;
}

.theme-toggle__btn:hover {
  background: rgba(236, 187, 114, 0.25);
  border-color: #ecbb72;
  color: #ecbb72;
  transform: rotate(30deg);
}

.theme-toggle__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 155px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: all 0.2s ease;
  pointer-events: none;
}

.theme-toggle__dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.theme-toggle__dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #333333;
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
}

.theme-toggle__dropdown button:hover {
  background: #f5f0e8;
}

.theme-toggle__dropdown button.active {
  color: #ecbb72;
  font-weight: 600;
}

.theme-toggle__dropdown button i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

/* ---------------------------------------------------------
   2. DESKTOP / MOBILE VISIBILITY
--------------------------------------------------------- */

/* Desktop: sits inside .contact_nav beside Register/Login */
.theme-toggle--desktop {
  display: inline-flex;
  margin-left: 12px;
}

/* Desktop button matches Register/Login gold color */
.theme-toggle--desktop .theme-toggle__btn {
  background-color: #ecbb72;
  border: 2px solid #ecbb72;
  color: #ffffff;
}

/* Desktop hover: reverts to transparent */
.theme-toggle--desktop .theme-toggle__btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  transform: rotate(30deg);
}

/* Mobile: sits beside the hamburger menu */
.theme-toggle--mobile {
  display: none;
  margin-left: auto;
  margin-right: 10px;
}

@media (max-width: 992px) {
  .theme-toggle--desktop {
    display: none;
  }

  .theme-toggle--mobile {
    display: inline-flex;
  }
}

@media (max-width: 420px) {
  .theme-toggle--mobile {
    flex: 0 0 auto;
    margin-left: auto;
    margin-right: 6px;
  }

  .theme-toggle__btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .custom_nav-container .navbar-toggler {
    flex: 0 0 auto;
    width: 34px;
    height: 36px;
  }

  .custom_nav-container .navbar-toggler span {
    width: 30px;
    height: 3px;
    margin: 6px 0;
  }

  .custom_nav-container .navbar-toggler span::before {
    top: -9px;
  }

  .custom_nav-container .navbar-toggler span::after {
    top: 9px;
  }
}

/* ---------------------------------------------------------
   3. AUTH PAGE — special placement
--------------------------------------------------------- */

.auth_brand_panel .theme-toggle {
  position: absolute;
  top: 22px;
  right: 22px;
}

/* ---------------------------------------------------------
   4. GREY THEME DROPDOWN OVERRIDE
   (the dropdown itself must stay visible on grey/dark bg)
--------------------------------------------------------- */

html[data-theme="grey"] .theme-toggle__dropdown {
  background: #e0e0e0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

html[data-theme="grey"] .theme-toggle__dropdown button {
  color: #1a1a1a;
}

html[data-theme="grey"] .theme-toggle__dropdown button:hover {
  background: #d0cec6;
}

html[data-theme="dark"] .theme-toggle__dropdown {
  background: #1e2a4a;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .theme-toggle__dropdown button {
  color: #e0e0e0;
}

html[data-theme="dark"] .theme-toggle__dropdown button:hover {
  background: #2a3a5a;
}

/* =========================================================
   5. GREY THEME — background & text overrides
========================================================= */

html[data-theme="grey"] body {
  background-color: #d6d6d6;
  color: #1a1a1a;
}

/* Sections with light/white backgrounds */
html[data-theme="grey"] .service_section .box .detail-box {
  background-color: #c5c5c5;
}

html[data-theme="grey"] .about_card {
  background-color: #c5c5c5;
}

html[data-theme="grey"] .contact_section form .form-control {
  background-color: #cbcbcb;
  color: #1a1a1a;
}

/* Auth page */
html[data-theme="grey"] .auth_card {
  background: #c8c8c8;
  border-color: rgba(0, 0, 0, 0.1);
}

html[data-theme="grey"] .auth_mode_switch {
  background: #b8b8b8;
}

html[data-theme="grey"] .auth_form_panel {
  background: #d0d0d0;
}

html[data-theme="grey"] .form_group input,
html[data-theme="grey"] .form_group select,
html[data-theme="grey"] .form_group textarea {
  background: #dcdcdc;
  border-color: #aaa;
  color: #1a1a1a;
}

html[data-theme="grey"] .auth_secondary_btn {
  background: #d0d0d0;
  color: #1a1a1a;
}

html[data-theme="grey"] .signup_step {
  background: #cacaca;
}

/* Portal / Dashboard */
html[data-theme="grey"] .portal_section {
  background: #cecece;
}

html[data-theme="grey"] .portal_header_card,
html[data-theme="grey"] .portal_card {
  background: #c2c2c2;
}

html[data-theme="grey"] .portal_status_box {
  background: #bfbfbf;
}

html[data-theme="grey"] .portal_modal_content {
  background: #cbcbcb;
}

/* Admin extras */
html[data-theme="grey"] #editUserForm select {
  background: #dcdcdc;
  color: #1a1a1a;
}

html[data-theme="grey"] .admin_role_filter {
  background: #dcdcdc;
  color: #1a1a1a;
}

html[data-theme="grey"] .password_modal {
  background: #cbcbcb;
}

html[data-theme="grey"] .status_unread {
  background: #ccc3a0;
}

/* Text colour adjustments for grey */
html[data-theme="grey"] .heading_container h2,
html[data-theme="grey"] .heading_container h1 {
  color: #1a1a1a;
}

html[data-theme="grey"] .service_section .box .detail-box h5 {
  color: #1a1a1a;
}

html[data-theme="grey"] .service_section .box .detail-box p {
  color: #2d2d2d;
}

html[data-theme="grey"] .about_card h2 {
  color: #1a1a1a;
}

html[data-theme="grey"] .about_card p,
html[data-theme="grey"] .about_card li {
  color: #2d2d2d;
}

html[data-theme="grey"] .portal_header_card h1,
html[data-theme="grey"] .portal_card h3 {
  color: #1a1a1a;
}

html[data-theme="grey"] .portal_info_box h4 {
  color: #1a1a1a;
}

html[data-theme="grey"] .auth_heading h2 {
  color: #1a1a1a;
}

html[data-theme="grey"] .auth_heading p {
  color: #333;
}

html[data-theme="grey"] .form_group label {
  color: #1a1a1a;
}

html[data-theme="grey"] .form_section_header h3 {
  color: #1a1a1a;
}

/* =========================================================
   6. DARK THEME — background & text overrides
========================================================= */

html[data-theme="dark"] body {
  background-color: #1a1a2e;
  color: #e0e0e0;
}

/* Sections with light/white backgrounds */
html[data-theme="dark"] .service_section .box .detail-box {
  background-color: #16213e;
}

html[data-theme="dark"] .about_card {
  background-color: #16213e;
  border-left-color: #ecbb72;
}

html[data-theme="dark"] .contact_section form .form-control {
  background-color: #1e2a4a;
  color: #e0e0e0;
  border-color: #2a3a5a;
}

html[data-theme="dark"] .contact_section form .form-control::placeholder {
  color: #8899aa;
}

/* Auth page */
html[data-theme="dark"] .auth_card {
  background: #16213e;
  border-color: #2a3a5a;
}

html[data-theme="dark"] .auth_mode_switch {
  background: #0f1a30;
}

html[data-theme="dark"] .auth_mode_btn {
  color: #b0b0b0;
}

html[data-theme="dark"] .auth_mode_btn.active {
  color: #1a1a2e;
}

html[data-theme="dark"] .auth_form_panel {
  background: #141428;
}

html[data-theme="dark"] .form_group input,
html[data-theme="dark"] .form_group select,
html[data-theme="dark"] .form_group textarea {
  background: #1e2a4a;
  border-color: #2a3a5a;
  color: #e0e0e0;
}

html[data-theme="dark"] .form_group input::placeholder,
html[data-theme="dark"] .form_group textarea::placeholder {
  color: #7788a0;
}

html[data-theme="dark"] .auth_secondary_btn {
  background: #1e2a4a;
  color: #e0e0e0;
}

html[data-theme="dark"] .signup_step {
  background: #1e2a4a;
  color: #b0b0b0;
}

/* Portal / Dashboard */
html[data-theme="dark"] .portal_section {
  background: #141428;
}

html[data-theme="dark"] .portal_header_card,
html[data-theme="dark"] .portal_card {
  background: #16213e;
}

html[data-theme="dark"] .portal_status_box {
  background: #1e2a4a;
}

html[data-theme="dark"] .portal_modal_content {
  background: #16213e;
}

/* Admin extras */
html[data-theme="dark"] #editUserForm select {
  background: #1e2a4a;
  color: #e0e0e0;
}

html[data-theme="dark"] .admin_role_filter {
  background: #1e2a4a;
  color: #e0e0e0;
}

html[data-theme="dark"] .password_modal {
  background: #16213e;
}

html[data-theme="dark"] .status_unread {
  background: #3a3520;
}

/* Text colour adjustments for dark */
html[data-theme="dark"] .heading_container h2,
html[data-theme="dark"] .heading_container h1 {
  color: #e8e8e8;
}

html[data-theme="dark"] .service_section .box .detail-box h5 {
  color: #e8e8e8;
}

html[data-theme="dark"] .service_section .box .detail-box p {
  color: #b0b0b0;
}

html[data-theme="dark"] .about_card h2 {
  color: #e8e8e8;
}

html[data-theme="dark"] .about_card p,
html[data-theme="dark"] .about_card li {
  color: #b0b0b0;
}

html[data-theme="dark"] .portal_header_card h1,
html[data-theme="dark"] .portal_card h3 {
  color: #e8e8e8;
}

html[data-theme="dark"] .portal_card p,
html[data-theme="dark"] .portal_card span {
  color: #b0b0b0;
}

html[data-theme="dark"] .portal_info_box h4 {
  color: #e0e0e0;
}

html[data-theme="dark"] .portal_info_box span {
  color: #8899aa;
}

html[data-theme="dark"] .auth_heading h2 {
  color: #e8e8e8;
}

html[data-theme="dark"] .auth_heading span {
  color: #ecbb72;
}

html[data-theme="dark"] .auth_heading p {
  color: #b0b0b0;
}

html[data-theme="dark"] .form_group label {
  color: #d0d0d0;
}

html[data-theme="dark"] .form_section_header h3 {
  color: #e0e0e0;
}

html[data-theme="dark"] .field_hint {
  color: #8899aa;
}

html[data-theme="dark"] .inline_check span {
  color: #c0c0c0;
}

html[data-theme="dark"] .auth_toggle_text {
  color: #b0b0b0;
}

html[data-theme="dark"] .declaration_list label span {
  color: #c0c0c0;
}

/* Table overrides for dark */
html[data-theme="dark"] .table {
  color: #e0e0e0;
}

html[data-theme="dark"] .table thead th {
  border-color: #2a3a5a;
}

html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th {
  border-color: #2a3a5a;
}

html[data-theme="dark"] .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}

/* Grey table overrides */
html[data-theme="grey"] .table {
  color: #1a1a1a;
}

html[data-theme="grey"] .table thead th {
  border-color: #aaa;
}

html[data-theme="grey"] .table td,
html[data-theme="grey"] .table th {
  border-color: #b5b5b5;
}

/* Legal Disclaimer overrides */
html[data-theme="dark"] .legal_disclaimer_section {
  background-color: #16213e;
}

html[data-theme="dark"] .legal_disclaimer_content p {
  color: #b0b0b0;
}

html[data-theme="dark"] .legal_disclaimer_section .heading_container h2 {
  color: #e8e8e8;
}

html[data-theme="grey"] .legal_disclaimer_section {
  background-color: #c0c0c0;
}

html[data-theme="grey"] .legal_disclaimer_content p {
  color: #1a1a1a;
}
