:root {
    /* Main colors */
    --carene-blue: #024e7d;      /* R 2 V 78 B 125 */
    --carene-gray: #8e7e7a;      /* R 142 V 126 B 122 */
    --carene-turquoise: #0ddfb5; /* R 13 V 223 B 181 */
    --carene-coral: #ff8283;     /* R 255 V 130 B 131 */
    --carene-white: #ffffff;     /* R 255 V 255 B 255 */
    --carene-black: #000000;     /* R 0 V 0 B 0 */

    /* Color variations for hover, focus, etc. */
    --carene-blue-light: #04639e; /* R 4 V 99 B 158 */
    --carene-gray-light: #a18e8a; /* R 161 V 142 B 138 */
    --carene-turquoise-light: #25eac2; /* R 37 V 234 B 194 */
    --carene-coral-light: #ff9a9b; /* R 255 V 154 B 155 */

    --carene-focus-ring: #024e7d40; /* 25% opacity for focus outlines : R 2 V 78 B 125 A 0.25 */
    --carene-light-hover: #024e7d26; /* 15% opacity for hover state : R 2 V 78 B 125 A 0.15 */
    --carene-shadow-soft: 0 5px 15px rgba(2, 78, 125, 0.15);

    /* Bootstrap color overrides */
    --bs-primary: var(--carene-blue);
    --bs-secondary: var(--carene-gray);
    --bs-success: var(--carene-turquoise);
    --bs-danger: var(--carene-coral);
    --bs-primary-rgb: 2, 78, 125;
    --bs-secondary-rgb: 142, 126, 122;
    --bs-success-rgb: 13, 223, 181;
    --bs-danger-rgb: 255, 130, 131;

    --bs-primary-text-emphasis: #02395c;
    --bs-primary-bg-subtle: #d9e8f2;
    --bs-primary-border-subtle: #8bb4cf;

    --bs-secondary-text-emphasis: #4f4644;
    --bs-secondary-bg-subtle: #ece8e7;
    --bs-secondary-border-subtle: #c7bbb8;

    --bs-success-text-emphasis: #056c57;
    --bs-success-bg-subtle: #d7faf2;
    --bs-success-border-subtle: #8ff0d8;

    --bs-danger-text-emphasis: #8d3f40;
    --bs-danger-bg-subtle: #ffe1e1;
    --bs-danger-border-subtle: #ffb8b9;

    /* Typography */
    --font-body: 'Barlow', "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: 'Barlow Condensed', "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

strong, b {
    font-weight: 700;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}
.navbar-brand:hover img {
    transform: scale(1.05);
}

/* Buttons */
.btn-primary {
    --bs-btn-color: var(--carene-white);
    --bs-btn-bg: var(--carene-blue);
    --bs-btn-border-color: var(--carene-blue);
    --bs-btn-hover-color: var(--carene-white);
    --bs-btn-hover-bg: var(--carene-blue-light);
    --bs-btn-hover-border-color: var(--carene-blue-light);
    --bs-btn-focus-shadow-rgb: 2, 78, 125;
}

.btn-secondary {
    --bs-btn-color: var(--carene-white);
    --bs-btn-bg: var(--carene-gray);
    --bs-btn-border-color: var(--carene-gray);
    --bs-btn-hover-color: var(--carene-white);
    --bs-btn-hover-bg: var(--carene-gray-light);
    --bs-btn-hover-border-color: var(--carene-gray-light);
    --bs-btn-focus-shadow-rgb: 142, 126, 122;
}

.btn-danger {
    --bs-btn-color: var(--carene-black);
    --bs-btn-bg: var(--carene-coral);
    --bs-btn-border-color: var(--carene-coral);
    --bs-btn-hover-color: var(--carene-black);
    --bs-btn-hover-bg: var(--carene-coral-light);
    --bs-btn-hover-border-color: var(--carene-coral-light);
    --bs-btn-focus-shadow-rgb: 255, 130, 131;
}

/* Cards and components */
.payment-card-header {
    background: linear-gradient(135deg, var(--carene-blue) 0%, #023e64 100%);
}

.payment-card-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.payment-tagline {
    opacity: 1;
    color: var(--carene-white);
    font-family: var(--font-body);
    font-style: italic;
    font-weight: 400;
}

.header-icon {
    color: var(--carene-white);
    flex-shrink: 0;
    transform: translateY(2px);
}

.step-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    border: 2px solid var(--carene-gray);
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--carene-shadow-soft);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: 700;
}

.step-icon {
    display: block;
    align-self: center;
    margin-block: 0.5rem;
    color: var(--carene-blue);
    flex-shrink: 0;
}


#paymentForm .form-control {
    border: 2px solid var(--carene-turquoise);
}
#paymentForm .form-control:focus {
    border-color: var(--carene-blue);
    box-shadow: 0 0 0 0.25rem var(--carene-focus-ring);
}

.payment-step {
    display: none;
}

.payment-step.active {
    display: block;
}

/* Footer styles */
.site-footer {
    background-color: var(--carene-blue);
}

/* Partner logos section */
.partner-logos {
    background: var(--carene-white);
    border-radius: 0.5rem;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    opacity: .95;
}

/* Modal image styles */
.modal-help-image {
    max-height: 80vh;
}

/* Payment embed component */
.payment-embed {
    position: relative;
    min-height: 200px;
}

.payment-embed-iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
    border-radius: .375rem;
}

.payment-embed-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(255, 255, 255, .92);
    border-radius: .375rem;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.payment-embed-overlay.d-none { display: none; }

.payment-embed-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: .25rem solid var(--bs-primary-border-subtle);
    border-top-color: var(--carene-blue);
    border-radius: 50%;
    animation: payment-spin .75s linear infinite;
}

@keyframes payment-spin {
    to { transform: rotate(360deg); }
}

.payment-embed-status {
    font-size: .95rem;
    color: var(--carene-blue);
    font-weight: 500;
}

/* Terminal state shown inside step3 after payment API response */
.payment-result-icon {
    font-size: 3rem;
}
.payment-result-icon.text-success { color: var(--bs-success) !important; }
.payment-result-icon.text-danger  { color: var(--bs-danger) !important; }
.payment-result-icon.text-warning { color: var(--bs-warning) !important; }
.payment-result-icon.text-secondary { color: var(--bs-secondary) !important; }
.payment-result-icon.text-muted   { color: var(--bs-secondary-color) !important; }

@media (prefers-reduced-motion: reduce) {
    .payment-embed-spinner { animation: none; }
}

/* Form validation styles */

.floating-img-tooltip {
    position: fixed;
    z-index: 2000;
    display: none;
    max-width: 640px;
    max-height: 640px;
    overflow: hidden;
    padding: 6px;
    pointer-events: none;
    background: var(--carene-white);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform-origin: bottom center;
}

.floating-img-tooltip img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.floating-img-tooltip .caption {
    margin-top: 6px;
    font-size: 12px;
    color: #444;
    text-align: center;
}

.img-tip-btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* =============================================
    ACCESSIBILITY: RESPECTING USER PREFERENCES
    ============================================= */
@media (prefers-reduced-motion: reduce) {
    .navbar-brand img,
    .step-card {
        transition: none;
    }

    .step-card:hover {
        transform: none;
    }
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
/* Used instead of inline style= to comply with CSP style-src without unsafe-inline */
.initially-hidden { display: none; }
.print-header     { display: none; }
.icon-circle-60   { width: 60px; height: 60px; }

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {

  /* Hide unnecessary elements */
  header.navbar,
  footer,
  .no-print {
    display: none !important;
  }

  /* White background, black text, no shadows — reduced size to fit on one page */
  body {
    background: var(--carene-white) !important;
    color: var(--carene-black) !important;
    font-size: 8.5pt !important;
  }

  h1, h2 { font-size: 13pt !important; }
  h3      { font-size: 11pt !important; }
  h4, h5  { font-size: 9.5pt !important; }
  h6, p, li, small, .text-body-secondary { font-size: 8.5pt !important; }

  /* Remove excessive margins/padding from container */
  .container-fluid,
  .container {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  /* Reduce card padding */
  .card-body,
  .p-4, .p-lg-5 {
    padding: 8px !important;
  }

  .mb-5 { margin-bottom: 10px !important; }
  .mb-4 { margin-bottom: 8px !important; }
  .mb-3 { margin-bottom: 6px !important; }
  .g-4  { gap: 6px !important; }

  /* Cards: no shadow, light border */
  .card {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  /* Success card header: solid background replaced with border */
  .payment-card-header.bg-success {
    background: var(--carene-white) !important;
    color: var(--carene-black) !important;
    border-bottom: 2px solid #198754 !important;
    padding: 8px !important;
  }

  /* Alerts: white background, black text */
  .alert {
    background: var(--carene-white) !important;
    color: var(--carene-black) !important;
    border: 1px solid #ccc !important;
    padding: 6px 10px !important;
  }

  /* Recap cards (bg-light) */
  .card.bg-light {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
  }
  /* No page breaks in recap */
  .row {
    break-inside: avoid;
  }

  /* Print header: injected via HTML */
  .print-header {
    display: block !important;
    font-size: 12pt !important;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;
    margin-bottom: 12px;
  }

  .btn,
  .g-recaptcha {
    display: none !important;
  }
}