/* =====================================================
                 ROOT VARIABLES
===================================================== */
:root {
  --primary: #0c301e;
  --primary-dark: #092417;
  --accent: #b8860b;
  --accent-glow: #d4a017;
  --bg-dark: #071a11;
  --card-bg: #08311d;
  --text-main: #ffffff;
  --text-muted: #b3c1b7;
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

  /* --- NEW CUSTOM THEME VARIABLES --- */
  --app-bg: #b3c1b7; /* Default for app-container */
  --box-bg: #092417; /* Default for cards */
  --box-border: #b8860b; /* NEW: Set to the same default color */
  --headings-color: #b8860b; /* Default for headings */
  --input-bg: #071a11;
  --input-text: #b3c1b7;
  --input-border: #b8860b;
  /* Add these right below your other custom theme variables */
  --app-text: #071a11; /* For paragraphs, labels, and regular text */
  --stepper-color: #b8860b; /* For stepper borders and buttons */
}
/* =====================================================
      FIXED THEME FOR ONBOARDING & SETTINGS
===================================================== */
body.fixed-vira-theme {
  /* Core Variables */
  --bg-dark: #050f0a !important;
  --primary-dark: #092417 !important;
  --accent: #b8860b !important;
  --text-main: #ffffff !important;
  --text-muted: #b3c1b7 !important;

  /* NEW: Force all dynamic theme variables back to ViRA Defaults */
  --app-bg: #b3c1b7 !important;
  --box-bg: #092417 !important;
  --headings-color: #b8860b !important;
  --input-bg: #071a11 !important;
  --input-text: #b3c1b7 !important;
  --input-border: #b8860b !important;
  --app-text: #b3c1b7 !important;
  --stepper-color: #b8860b !important;

  /* Buttons & Sliders */
  --primary-btn-bg: #b8860b !important;
  --primary-btn-text: #000000 !important;
  --slider-bg: #333333 !important;
}
/* =====================================================
              RESET & GLOBAL ELEMENTS
===================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Poppins", sans-serif;

  /* Fallback for older browsers */
  background-color: var(--bg-dark);
  /* Premium Radial Gradient using your theme variables */
  background: radial-gradient(
    circle at top center,
    var(--primary-dark) 0%,
    var(--bg-dark) 100%
  );
  /* Keeps the gradient fixed in place while scrolling the content */
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 120px; /* Space for sticky footer */
}

h1,
h2,
h3 {
  font-family: "Inter", sans-serif;
}
.custom-hr {
  width: 60px;
  height: 5px;
  background: var(--accent);
  border: none;
  margin: 12px auto 14px;
  border-radius: 5px;
}
/* =====================================================
                     ANIMATIONS
===================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.03);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/*====*----++++----*====*----++++----*====*----++++----*====*/

/* =====================================================
                  SPLASH SCREEN
===================================================== */
#splash-screen {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: rgba(9, 36, 23, 0.65);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Smooth transition for when we add the 'hidden' class */
  transition:
    opacity 0.8s ease,
    visibility 0.8s;
  border: none !important; /* Removed the border as discussed */
}
#splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.logo-main {
  max-width: 100px;
  margin-bottom: 10px;
}
.loader {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(184, 134, 11, 0.3);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 2s ease-in-out infinite;
}
/* =====================================================
                  APP CONTAINER
===================================================== */
#app-container,
#settingsModal {
  background-color: var(--app-bg); /* Updated */
}
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px;
}
.hidden {
  display: none !important;
}
.fade-in {
  animation: fadeIn 1.2s ease-in-out;
}
.header-main-section {
  width: 100%;
  display: flex; /* Changed to flex */
  justify-content: center; /* Centers the tagline horizontally */
  align-items: center; /* Centers the tagline vertically */
  margin-bottom: 25px;
}

.tagline {
  display: inline-flex; /* Makes the inside of the box a flex container */
  align-items: center; /* Vertically centers the text and the icon together */
  justify-content: center; /* Horizontally centers text and icon */
  gap: 12px; /* Moved here so it creates space between the text and icon */
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--text-main);
  padding: 8px 18px;
  border-radius: var(--border-radius);
  border: 1px dashed var(--bg-dark);
  background: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tagline i {
  font-size: 1.6rem;
  color: var(--text-main);
}
/* =====================================================
              GLOBAL COMPONENTS || CARD
===================================================== */
.card {
  background: var(--box-bg); /* Updated */
  /* backdrop-filter: none; */
  border: 1px solid var(--box-border);
  border-radius: var(--border-radius);
  padding: 16px;
  margin-bottom: 16px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--headings-color); /* Updated */
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
/* =====================================================
                       STEPPER
===================================================== */
/* Update Labels and General Text */
.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
/* Update the Stepper Container & Buttons */
.stepper-btn {
  width: 40px;
  height: 40px;
  background: var(--box-bg); /* Matches the card background */
  border: 1px solid var(--stepper-color); /* New Stepper variable */
  color: var(--stepper-color); /* New Stepper variable */
  border-radius: 8px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper-val {
  font-family: "Anton";
  font-size: 1.1rem;
  font-weight: 200;
  width: 40px;
  text-align: center;
  color: var(--headings-color); /* Uses general text color */
}

/* Update the dynamically injected text from estimate.js */
#cableStatusText,
#cableUnitLabel {
  color: var(--headings-color) !important;
}

/* =====================================================
              COMPONENTS || ID'S || CLASSES
===================================================== */
#brandSeries {
  /* border: 1px dashed var(--accent); */
  /* color: var(--text-muted); */
  /* padding: 8px 12px; */
  /* border-radius: 8px; */
  font-size: 1rem !important;
  flex-grow: 1;
  max-width: 100%;
  cursor: pointer;
}
.auto-select-input {
  background: var(--primary-dark) !important;
  color: var(--text-muted) !important;
  border: 1px dashed var(--accent) !important;
  opacity: 0.9;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}
#hddSize {
  background-color: var(--primary-dark);
}
.cable-sub-heading {
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--headings-color);
  margin: 0 auto 12px auto;
  padding: 5px 10px;
  border-radius: 10px;
}
.accessory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
}
.toggle-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--headings-color);
  font-weight: 600;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--slider-bg, #333); /* NEW Variable */
  transition: 0.4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--stepper-color); /* Matches current theme's accent */
}
input:checked + .slider:before {
  transform: translateX(20px);
}
/* =====================================================
                 ADDITIONAL COMPONENTS
===================================================== */
.extras-panel {
  display: none;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed var(--headings-color);
}
.extras-panel.show {
  display: block;
  animation: slideDown 0.3s ease-out;
}
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-weight: 500;
  color: var(--headings-color);
}
/* =====================================================
                     STICKY FOOTER
===================================================== */
.sticky-footer {
  position: fixed;
  bottom: 20px; /* Lifted off the bottom slightly */
  left: 50%;
  transform: translateX(-50%); /* Centers the footer */
  width: 90%; /* Responsive width */
  max-width: 440px; /* Matches the inner width of your cards */
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}
.total-label {
  font-size: larger;
  font-weight: 600;
  color: var(--headings-color);
}
.total-price {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--headings-color);
}

.tax-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

.tax-table td {
  padding: 6px 0;
}

/* Update the Tax Table */
.tax-table td:first-child {
  text-align: left;
  color: var(--tax-text, #b3c1b7); /* NEW Variable for labels */
}

.tax-table td:last-child {
  text-align: right;
  font-weight: 600;
  color: var(--tax-value, #ffffff); /* NEW Variable for ₹0 amounts */
}

.grand-total-row td {
  border-top: 1px dashed rgba(0, 0, 0, 0.2);
  padding-top: 8px;
  font-size: 16px;
  font-weight: 700;
}
/* =====================================================
                     CUSTOMER MODAL
===================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Changed from hardcoded dark green to a neutral dark transparent layer */
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-content {
  width: 90%;
  max-width: 500px;
  background: var(--box-bg); /* CHANGED: Dynamic Box Background */
  padding: 30px;
  border-radius: 20px;
  border: 1px dashed var(--input-border); /* CHANGED: Dynamic Border */
  color: var(--app-text); /* CHANGED: Dynamic Text */
  margin-bottom: 20px;
  font-family: "Poppins";
}
2. The C .form-group {
  margin-bottom: 12px;
}
.error-msg {
  color: #ff4d4d;
  font-size: 12px;
  display: block;
  margin-top: 4px;
}
.input-error {
  border: 1px solid #ff4d4d !important;
}
#customerModal input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px dashed var(--input-border); /* CHANGED: Dynamic Border */
  background: var(--input-bg); /* CHANGED: Dynamic Input Background */
  color: var(--input-text); /* CHANGED: Dynamic Text */
  font-size: 14px;
  outline: none;
  transition: 0.2s ease;
}

#customerModal input::placeholder {
  color: var(--input-text); /* CHANGED */
  opacity: 0.5;
}

#customerModal input:focus {
  border-color: var(--stepper-color); /* CHANGED: Dynamic Accent */
  box-shadow: none; /* Safest way to remove the hardcoded gold glow */
}
/* =====================================================
              GLOBAL COMPONENTS || BUTTON
===================================================== */

.btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-primary {
  background: var(
    --primary-btn-bg,
    var(--accent)
  ); /* Falls back to accent if missing */
  color: var(--primary-btn-text, #000000); /* Falls back to black */
}

/* Optional: To make the active/click state work beautifully for ANY color without needing a new variable, you can use a brightness filter instead of a hardcoded glow color: */
.btn-primary:active {
  transform: scale(0.98);
  filter: brightness(0.85);
}

.btn-secondary {
  background: var(--headings-color);
  color: var(--app-text);
}
.btn-secondary:active {
  transform: scale(0.98);
  background: var(--primary);
}
.btn-outline {
  border: 1px solid var(--stepper-color); /* CHANGED: Dynamic Border */
  background: transparent;
  color: var(--stepper-color); /* CHANGED: Dynamic Text */
}
.btn-whatsapp {
  background: linear-gradient(45deg, #25d366, #128c7e);
  box-shadow: 0 0 12px rgba(37, 211, 102, 0.4);
}
.btn-whatsapp:hover {
  transform: translateY(-2px);
}
/* =====================================================
                      FORM ELEMENTS
===================================================== */
label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--headings-color);
}

.auto-select-input,
select,
textarea,
input[type="text"],
input[type="number"],
input[type="tel"],
input[type="file"],
select.extra-select {
  background: var(--input-bg) !important;
  color: var(--input-text) !important;
  border: 1px dashed var(--input-border) !important;
  opacity: 0.9;
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

/* =====================================================
               CUSTOM FILE INPUT STYLING
===================================================== */
input[type="file"] {
  width: 100%;
  padding: 8px;
  background: #071a11; /* Matches your other inputs */
  border: 1px dashed var(--accent);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

/* Styles the actual "Choose File" button inside the input */
input[type="file"]::file-selector-button {
  background-color: var(--accent);
  color: #000;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  margin-right: 12px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

input[type="file"]::file-selector-button:hover {
  background-color: var(--accent-glow);
  transform: scale(0.98);
}
select:focus,
input:focus {
  border-color: var(--accent);
  outline: none;
}
/* =====================================================
                       INVOICE
===================================================== */
#invoice-view {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100%;
  max-width: 650px;
  height: auto;
  max-height: 100vh;
  transform: translate(-50%, -50%);
  overflow-y: auto;
  color: var(--bg-dark);
  background: #f4f6f8;
  padding: 15px;
  border-radius: 0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 300;
  animation: scaleIn 0.25s ease;
}
#invoice-view h2,
#invoice-view h3 {
  color: var(--primary-dark);
  margin-bottom: 6px;
}
#invoice-view p {
  margin: 4px 0;
  font-size: 14px;
}
#invoice-view table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 12px;
}
#invoice-view th {
  background: var(--primary-dark);
  color: var(--accent);
  padding: 10px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
#invoice-view td {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #333;
}
#invoice-view tr:last-child td {
  border-bottom: none;
}
.invoice-wrapper {
  background: #ffffff;
  max-width: 700px;
  font-family: "Inter", sans-serif;
  margin: auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  page-break-inside: avoid;
  padding-bottom: 40px;
}
.invoice-title-strip {
  background: var(--primary-dark);
  color: #fff;
  padding: 8px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.invoice-header-block {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  margin-bottom: 10px;
  gap: 20px;
  flex-wrap: wrap;
}
.company-block {
  width: 100%;
  flex: 1 1 300px;
}
.company-details p {
  font-size: 14px !important; /* Adjust here */
  margin: 2px 0 !important;
}
.company-details h3 {
  font-size: 18px !important;
  margin-bottom: 6px !important;
  text-transform: capitalize !important;
}
.big-logo {
  width: 100px !important;
  max-width: 70px;
  height: auto !important;
  margin-bottom: 10px;
}
.quotation-block {
  flex: 1 1 200px;
  text-align: right;
}
.quotation-number {
  display: flex;
  font-weight: 600;
  margin-bottom: 10px;
  justify-content: space-between;
}
.to-block {
  margin-top: 15px;
  color: var(--bg-dark);
  padding: 0;
  text-align: left;
}
.to-label {
  font-weight: bold;
  background: var(--primary-dark);
  padding: 5px;
  color: #fff;
}
.modern-invoice-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px;
}
.modern-invoice-table th {
  background: var(--primary-dark);
  color: #fff;
  padding: 10px;
  text-align: left;
  font-size: 13px;
}
.modern-invoice-table td {
  border: 1px solid #ccc;
  padding: 8px;
  font-size: 13px;
}
.modern-invoice-table td:nth-child(4),
.modern-invoice-table td:nth-child(5) {
  text-align: right;
}
.modern-invoice-table th:nth-child(1),
.modern-invoice-table th:nth-child(3),
.modern-invoice-table td:nth-child(1),
.modern-invoice-table td:nth-child(3) {
  text-align: center;
}
.invoice-total-block {
  margin-top: 20px;
  text-align: right;
  font-size: 15px;
}
.invoice-total-block h3 {
  margin-top: 10px;
  color: var(--bg-dark);
}
.invoice-footer {
  margin-top: 30px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
}
.footer-note {
  font-size: 12px;
  color: #444;
  margin-bottom: 10px;
}
.footer-strip {
  justify-content: space-between;
  align-items: center;
  text-align: center;
  background: #092417;
  padding: 8px 12px;
  width: 100%;
  font-size: 12px;
  letter-spacing: 1px;
  box-sizing: border-box;
  flex-wrap: wrap; /* IMPORTANT */
  margin-top: 20px;
  display: flex;
  position: relative !important;
  color: white !important;
  gap: 10px;
  font-size: 13px;
  page-break-inside: avoid !important;
}
.footer-strip > div {
  display: flex;
  align-items: center;
  gap: 6px;
}
.no-print-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}
#cableStatusText {
  color: var(--accent);
  font-family: "Poppins";
  font-weight: lighter !important;
  font-size: 0.8rem;
  margin-bottom: 10px;
}
.invoice-actions {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.invoice-actions .btn {
  flex: 1;
  padding: 12px;
  font-weight: 600;
  border-radius: 10px;
}
@page {
  size: A4;
  margin: 10mm;
}
/* =====================================================
                      MOBILE OPTIMIZATION
===================================================== */
@media print {
  html,
  body {
    height: auto !important;
    min-height: auto !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
    background: #ffffff !important;
  }
  #app-container,
  #sticky-footer,
  #customerModal,
  .modal-overlay,
  .invoice-actions,
  #splash-screen,
  .no-print-actions {
    display: none !important;
  }
  .invoice-container {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }
  .invoice-wrapper {
    page-break-inside: avoid !important;
    min-height: auto !important;
    width: 100%;
    background: #ffffff;
    max-width: 700px;
    font-family: "Inter", sans-serif;
    margin: auto;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    page-break-inside: avoid;
    padding-bottom: 15px;
  }
  #invoice-view {
    display: block !important;
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    background: white !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 10px !important;
    overflow: visible !important;
  }
  #invoice-view table {
    width: 100% !important;
    border-collapse: collapse !important;
  }
  #invoice-view th,
  #invoice-view td {
    border: 1px solid #d2d2d2 !important;
    padding: 8px !important;
  }
  #invoice-view th {
    background-color: var(--primary-dark) !important;
    color: var(--accent) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #invoice-view h2,
  #invoice-view h3,
  #invoice-view p,
  #invoice-view strong {
    color: var(--bg-dark) !important;
  }
  .invoice-actions {
    display: none !important;
  }
  .quotation-block {
    width: 40% !important;
    text-align: right !important;
    margin-bottom: 15px !important;
  }
  .invoice-footer {
    display: block !important;
    width: 100% !important;
    page-break-inside: avoid !important;
    page-break-before: avoid !important;
  }

  .footer-strip {
    display: flex !important;
    flex-direction: row !important;
    gap: 5px !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    background: #092417 !important;
    color: #ffffff !important;
    page-break-inside: avoid !important;
  }

  @page {
    size: A4;
    margin: 8mm;
  }
}
@media screen and (max-width: 600px) {
  .invoice-wrapper {
    padding: 15px;
    border-radius: 6px;
  }
  #invoice-view {
    top: 0 !important;
    left: 0 !important;
    padding: 15px;
    transform: none !important;
    width: 100%;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0;
    overflow-y: auto !important;
    padding-bottom: 60px !important;
  }
  #invoice-view table {
    font-size: 12px;
  }
  #invoice-view th,
  #invoice-view td {
    padding: 6px;
  }
  /* .invoice-header-block {
    flex-direction: column;
  } */
  /* .quotation-number {
    justify-content: space-between;
  } */

  /* Keep Header Side-by-Side on Mobile */
  .invoice-header-block {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }

  /* Force 50/50 Split */
  .company-block {
    flex: 1 !important;
    min-width: 0 !important; /* Prevents long text from breaking the layout */
  }

  .quotation-block {
    flex: 1 !important;
    min-width: 0 !important;
    text-align: right !important;
  }

  /* Scale down fonts so they fit side-by-side beautifully */
  .company-details h3 {
    font-size: 16px !important;
    margin-bottom: 2px !important;
  }

  .company-details p {
    font-size: 11px !important;
  }

  .quotation-number {
    justify-content: flex-end !important;
    font-size: 11px !important;
    margin-bottom: 5px !important;
  }

  .quotation-block p {
    font-size: 10px !important;
  }

  .big-logo {
    max-width: 60px !important; /* Shrinks logo slightly for mobile */
  }
  .modern-invoice-table {
    font-size: 12px;
  }
  .modern-invoice-table th,
  .modern-invoice-table td {
    padding: 6px;
  }
  .invoice-total-block {
    font-size: 14px;
    page-break-inside: avoid !important;
  }
  .invoice-totals {
    font-size: 14px;
  }
  .invoice-grand {
    font-size: 16px;
  }
  .footer-strip {
    display: flex !important;
    width: 100% !important;
    flex-direction: column !important;
    gap: 6px;
    align-items: flex-start;
    text-align: center;
    justify-content: center;
    font-size: 12px;
  }
  .footer-strip > div {
    width: 100%;
  }
}
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: translate(-50%, -55%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* =====================================================
       DYNAMIC INVOICE THEME COLOR OVERRIDES
===================================================== */

/* 1. Update Headings & Totals to use the theme's dark background color */
#invoice-view h2,
#invoice-view h3,
.invoice-total-block h3 {
  color: var(--headings-color) !important;
}

/* 2. Update Table Headers */
#invoice-view th,
.modern-invoice-table th {
  background-color: var(--box-bg) !important;
  color: var(--stepper-color) !important; /* Theme Accent */
}

/* 3. Update Title Strip, 'To' Label, and Footer */
.invoice-title-strip,
.to-label,
.footer-strip {
  background-color: var(--box-bg) !important;
}

/* 4. Update the Quote ID box (overrides the inline HTML style) */
.quotation-number div:first-child {
  background-color: var(--stepper-color) !important;
}

/* 5. Ensure the exact same colors apply when the user PRINTS or saves as PDF */
@media print {
  #invoice-view th,
  .modern-invoice-table th {
    background-color: var(--box-bg) !important;
    color: var(--stepper-color) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #invoice-view h2,
  #invoice-view h3,
  .invoice-total-block h3 {
    color: var(--box-bg) !important;
  }

  .invoice-title-strip,
  .to-label,
  .footer-strip {
    background-color: var(--box-bg) !important;
  }

  .quotation-number div:first-child {
    background-color: var(--stepper-color) !important;
  }
}
