/* Winter Is Coming promo bar + discount modal — scoped for legacy (v1) layouts.
   Matches the live homepage bar from style.min.css (light blue + gold CTA). */

@keyframes stickyBarPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 183, 51, 0.45); }
    100% { box-shadow: 0 0 0 15px rgba(255, 183, 51, 0); }
}

.sticky-bar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #A8E0FB;
    padding: 5px 15px;
    color: #000;
    z-index: 10050;
    font-weight: 700;
    font-size: 16px;
    overflow: hidden;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    box-sizing: border-box;
}

.sticky-bar .sticky-nov-txt,
.sticky-bar p.sticky-nov-txt {
    color: #000;
    font-size: 22px;
    font-weight: 700;
    padding-top: 5pt;
    padding-bottom: 5pt;
    margin: 0;
    line-height: 1.3;
}

.sticky-bar .sticky-bar-btn,
.sticky-bar a.sticky-bar-btn {
    animation: stickyBarPulse 2s infinite;
    background: #FFB733;
    color: #000;
    border-radius: 50px;
    padding: 5px 20px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    border: 0;
    cursor: pointer;
    white-space: nowrap;
}

.sticky-bar .sticky-bar-btn:hover,
.sticky-bar a.sticky-bar-btn:hover,
.sticky-bar .sticky-bar-btn:focus,
.sticky-bar a.sticky-bar-btn:focus {
    background: #f0a820;
    color: #000;
    text-decoration: none;
}

@media screen and (max-width: 768px) {
    .sticky-bar {
        flex-direction: column;
        padding: 5px 8px;
        gap: 4px;
    }
    .sticky-bar .sticky-nov-txt,
    .sticky-bar p.sticky-nov-txt {
        font-size: 15px;
        padding-top: 2px;
        padding-bottom: 2px;
    }
    .sticky-bar .sticky-bar-btn,
    .sticky-bar a.sticky-bar-btn {
        font-size: 14px;
    }
}

/* Discount modal structural CSS (legacy pages do not load Bootstrap 5). */
#discountCodeModal.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10100;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
}
#discountCodeModal.modal.show {
    display: block;
}
#discountCodeModal .modal-dialog {
    position: relative;
    width: auto;
    max-width: 500px;
    margin: 1.75rem auto;
    pointer-events: none;
}
#discountCodeModal .modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}
#discountCodeModal .modal-content {
    pointer-events: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: #fff;
}
#discountCodeModal .btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em;
    color: #fff;
    background: transparent;
    border: 0;
    border-radius: 0.25rem;
    opacity: 0.9;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    margin-left: auto;
}
#discountCodeModal .btn-close::before {
    content: "\00d7";
    display: block;
    color: #fff;
    font-weight: 700;
}
#discountCodeModal .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
#discountCodeModalBackdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    opacity: 0.5;
    z-index: 10090;
}
body.sticky-bar-modal-open {
    overflow: hidden;
}
@media screen and (max-width: 575.98px) {
    #discountCodeModal .modal-dialog {
        margin: 0.75rem;
        max-width: calc(100% - 1.5rem);
    }
}

/* Keep the discount modal usable on legacy pages that still load Bootstrap 3. */
#discountCodeModal .modal-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    background-color: #003d7a;
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid #5BA3F5;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
#discountCodeModal .modal-title,
#discountCodeModal p.modal-title {
    margin: 0;
    flex: 1 1 auto;
    font-weight: 700;
    font-size: 1.5rem;
    color: #ffffff;
    line-height: 1.3;
}
#discountCodeModal .modal-header .btn-close {
    position: relative;
    margin: 0 0 0 12px;
    flex: 0 0 auto;
    float: none;
}
#discountCodeModal .modal-body {
    padding: 1.5rem;
}
#discountCodeModal .form-label {
    display: block;
    color: #003d7a;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
#discountCodeModal .form-control {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 2px solid #5BA3F5;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    height: auto;
    min-height: 44px;
}
#discountCodeModal .mb-3 { margin-bottom: 1rem; }
#discountCodeModal .mb-2 { margin-bottom: 0.5rem; }
#discountCodeModal .w-100 { width: 100%; }
#discountCodeModal .text-danger { color: #DC3545; }

/* Legacy site CSS positions some labels absolutely; keep modal labels in normal flow. */
#discountCodeModal label,
#discountCodeModal .form-label,
#discountCodeModal .mb-3 > label {
    position: static !important;
    float: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    clip: auto !important;
    overflow: visible !important;
    color: #003d7a !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
}
#discountCodeModal .form-check-label {
    display: inline !important;
    margin-bottom: 0 !important;
    cursor: pointer;
}
#discountCodeModal .visually-hidden,
#discountCodeModal .visually-hidden * {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    display: block !important;
    color: transparent !important;
}
