/* Unified Theme File for Light & Dark Mode
  - :root contains the default (Light Mode) variables.
  - [data-theme="dark"] contains the overrides for Dark Mode.
*/

:root {
  /* Light Theme (Default) */
  --template-bg: #F4F7F6; /* Light Gray - Main Background */
  --template-color: #4A5568; /* Medium Gray - Body Text */

  --white: #FFFFFF; /* White - Card/Section Backgrounds */
  --black: #1A202C; /* Near Black - Headings & Strong Text */

  --primary-color: #0891B2; /* Cyan - Primary Accent */
  --secondary-color: #F59E0B; /* Amber/Orange - Secondary Accent */
  --tertiary-color: #0891B2;
  --quaternary-color: #06B6D4; /* Bright Cyan */
  --quinary-color: #1A202C;
  --septenary-color: #F9FAFB;
  --senary-color: #6B7280;

  --hover-color: #FBBF24; /* Amber Hover */

  /* Jetliner Aero Specific Colors */
  --apece-base: #0891B2; /* Cyan */
  --apece-primary: #F59E0B; /* Amber */
  --apece-secondary: #EF4444; /* Red for alerts/danger */
  --apece-title: #015551; /* Near Black */
  --apece-success: #10B981; /* Muted Green */

  /* Shadows & Transitions */
  --transition: all 0.5s ease;
  --shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.07);
  --shadow-secondary: 0px 10px 30px 0px rgba(0, 0, 0, 0.05);
  --shadow-tertiary: 0px 4px 8px 0px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] {
  /* Dark Theme (Cockpit) Overrides */
  --template-bg: #111827; /* Near Black - Main Background */
  --template-color: #9CA3AF; /* Medium Gray - Body Text */

  --white: #1F2937; /* Dark Slate - Card/Section Backgrounds */
  --black: #F9FAFB; /* Off-White - Headings & Strong Text */

  --primary-color: #0891B2; /* Cyan - Primary Accent */
  --secondary-color: #F59E0B; /* Amber/Orange - Secondary Accent */
  --tertiary-color: #0891B2;
  --quaternary-color: #06B6D4; /* Bright Cyan */
  --quinary-color: #F9FAFB;
  --septenary-color: #0F172A;
  --senary-color: #4B5563;

  --hover-color: #FBBF24; /* Amber Hover */

  /* Jetliner Aero Specific Colors */
  --apece-base: #0891B2; /* Cyan */
  --apece-primary: #F59E0B; /* Amber */
  --apece-secondary: #EF4444; /* Red for alerts/danger */
  --apece-title: #F9FAFB; /* Off-White */
  --apece-success: #10B981; /* Muted Green */

  --shadow: 0px 10px 25px 0px rgba(0, 0, 0, 0.2);
  --shadow-secondary: 0px 10px 30px 0px rgba(0, 0, 0, 0.15);
  --shadow-tertiary: 0px 4px 8px 0px rgba(0, 0, 0, 0.1);
}

/* --- Styles for the Theme Toggle Switch --- */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
}
.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    cursor: pointer;
}
.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
.theme-switch input:checked + .slider {
    background-color: #2196F3;
}
.theme-switch input:checked + .slider:before {
    transform: translateX(26px);
}
.slider .fa-sun {
    color: #f59e0b; /* Amber */
}
.slider .fa-moon {
    color: #4a5568; /* Gray */
}
[data-theme="dark"] .slider {
    background-color: #4B5563; /* Dark Gray */
}
[data-theme="dark"] .slider:before {
    background-color: #1F2937; /* Dark Slate */
}

/* --- NEW: Floating Button Styles --- */
.floating-theme-switcher {
    position: fixed;
    bottom: 100px;
    right: 25px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
}
.floating-theme-switcher.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
