/* ==========================================================================
   STAR Hospitals — cookie compliance (banner + lead-form consent checkbox)

   Every selector in this file is namespaced `star-cc-` so it cannot collide
   with anything already on starhospitals.in or on the paid landing pages
   under /lp/. Nothing here restyles an existing element except the four
   `html.star-cc-open` rules at the bottom, which only lift the site's
   existing bottom-anchored fixed widgets while the banner is on screen so
   the banner never covers them. Remove the file (or the one snippet that
   loads it) and the site is byte-for-byte what it was before.

   Palette is taken from resources/scss/utils/_variables.scss:
     $starhospitals-ui-secondary  #001D3B   banner background
     $starhospitals-brand-primary #004E9E   checkbox accent / focus ring
     $starhospitals-brand-secondary #E3000F validation message
   The green on "Accept All" is the same gradient the floating WhatsApp
   button already uses (#12C665 -> #009446).
   ========================================================================== */

:root {
    --star-cc-h: 0px; /* live banner height, written by star-cc.js */
}

/* --------------------------------------------------------------------------
   1. Bottom cookie banner
   -------------------------------------------------------------------------- */

.star-cc-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* Above .floating-btn / .scroll-top-top (3500) and .sh-wa-btn (3400),
       but below the .p-enq enquiry modal overlay (3600) so a dialog still
       covers the banner rather than fighting it. */
    z-index: 3550;
    box-sizing: border-box;
    padding: 14px 20px;
    background: #001D3B;
    color: #FFFFFF;
    font-family: 'Plus Jakarta Sans', 'Rubik', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.28);
    transform: translateY(100%);
    transition: transform 0.28s ease;
}

.star-cc-banner.star-cc-banner--visible {
    transform: translateY(0);
}

.star-cc-banner *,
.star-cc-banner *::before,
.star-cc-banner *::after {
    box-sizing: border-box;
}

.star-cc-banner__inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.star-cc-banner__text {
    margin: 0;
    color: #FFFFFF;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 400;
}

.star-cc-banner__link,
.star-cc-banner__link:visited {
    color: #8FC4FF;
    text-decoration: underline;
    font-weight: 600;
    white-space: nowrap;
}

.star-cc-banner__link:hover,
.star-cc-banner__link:focus {
    color: #FFFFFF;
}

.star-cc-banner__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.star-cc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.star-cc-btn:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

.star-cc-btn--accept {
    background: linear-gradient(90deg, #12C665 0.85%, #009446 100%);
    color: #FFFFFF;
}

.star-cc-btn--accept:hover {
    opacity: 0.9;
}

.star-cc-btn--decline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.55);
    color: #FFFFFF;
}

.star-cc-btn--decline:hover {
    background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 820px) {
    .star-cc-banner {
        padding: 12px 16px;
    }

    .star-cc-banner__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .star-cc-banner__text {
        font-size: 13px;
    }

    .star-cc-banner__actions {
        justify-content: stretch;
    }

    .star-cc-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 11px 12px;
    }
}

@media print {
    .star-cc-banner {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   2. Lead-form consent checkbox
   -------------------------------------------------------------------------- */

.star-cc-consent {
    display: block;
    width: 100%;
    margin: 14px 0 16px;
    font-family: 'Plus Jakarta Sans', 'Rubik', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    text-align: left;
}

.star-cc-consent__label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
    color: inherit;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
}

.star-cc-consent__input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 3px 0 0;
    padding: 0;
    accent-color: #004E9E;
    cursor: pointer;
}

.star-cc-consent__input:focus-visible {
    outline: 2px solid #004E9E;
    outline-offset: 2px;
}

.star-cc-consent__text {
    display: block;
}

.star-cc-consent__text a,
.star-cc-consent__text a:visited {
    color: #004E9E;
    text-decoration: underline;
    font-weight: 600;
}

.star-cc-consent__text a:hover,
.star-cc-consent__text a:focus {
    text-decoration: underline;
}

.star-cc-consent__error {
    display: block;
    margin-top: 6px;
    color: #E3000F;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;
}

.star-cc-consent__error[hidden] {
    display: none;
}

/* On dark form panels (several landing pages put the form on the brand blue)
   the inherited colour would be unreadable, so opt those in explicitly. */
.star-cc-consent--on-dark .star-cc-consent__label {
    color: #FFFFFF;
}

.star-cc-consent--on-dark .star-cc-consent__text a,
.star-cc-consent--on-dark .star-cc-consent__text a:visited {
    color: #8FC4FF;
}

.star-cc-consent--on-dark .star-cc-consent__error {
    color: #FFC7CB;
}

/* --------------------------------------------------------------------------
   3. Keep the banner clear of the site's existing fixed widgets

   These are the only rules that reference existing classes. They apply ONLY
   while `star-cc-open` is present on <html> (i.e. while the banner is
   showing) and only move the widgets up by the banner's own height, so the
   moment a visitor accepts or declines every element returns to its
   original position.
   -------------------------------------------------------------------------- */

html.star-cc-open .sh-wa-btn {
    bottom: calc(72px + var(--star-cc-h));
}

html.star-cc-open .scroll-top-top {
    bottom: calc(1% + var(--star-cc-h));
}

@media (max-width: 769px) {
    /* Below 769px .floating-btn becomes a full-width bottom bar and
       .sh-wa-btn / .scroll-top-top stack above it. */
    html.star-cc-open .floating-btn {
        bottom: var(--star-cc-h);
    }

    html.star-cc-open .sh-wa-btn {
        bottom: calc(10vh + 62px + var(--star-cc-h));
    }

    html.star-cc-open .scroll-top-top {
        bottom: calc(10% + var(--star-cc-h));
    }
}

/* --------------------------------------------------------------------------
   4. Cookie Policy page body

   `.t-c-description` is shared with /privacy and /terms-and-conditions, so
   this rule is scoped to `.star-cc-policy` — a class that exists only on
   resources/views/cookie-policy.blade.php. The other two pages are untouched.
   -------------------------------------------------------------------------- */

.star-cc-policy div strong {
    font-size: 18px;
}
