/**
 * Public-facing styles for Oly Notification System
 */

:root {
    --oly-color-error: #FF9C9C;
    --oly-color-warning: #FFE500;
    --oly-color-success: #08F9AE;
    --oly-color-info: #58D8FF;
    --oly-text-white: #FFF;
    --oly-font-family: 'Montserrat', sans-serif;
}

/* ===============================================
   NOTIFICATION BAR STYLES (Desktop First)
   =============================================== */
.oly-notification-wrapper {
    display: none;
    position: fixed;
    top: 124px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99998;
    width: 100%;
    max-width: 1140px;
    padding: 0 16px;
    box-sizing: border-box;

    justify-content: flex-end;

    pointer-events: none;
}

.oly-notification-wrapper:has(.oly-notification-bar.is-visible) {
    display: flex;
}


.oly-notification-bar {
    display: flex;
    padding: 12px 8px 12px 12px;
    justify-content: center;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    background: rgba(41, 41, 53, 0.85);
    backdrop-filter: blur(7.5px);
    -webkit-backdrop-filter: blur(7.5px);
    font-family: var(--oly-font-family);

    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0s 0.4s;

    width: 560px;
    max-width: 100%;

    pointer-events: auto;
}


.oly-notification-bar.is-visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* --- Dynamic Border & Color Styles --- */
/* (This section remains the same) */
.bar-style-error {
    border-bottom: 6px solid var(--oly-color-error);
    border-top: 1px solid var(--oly-color-error);
    border-left: 1px solid var(--oly-color-error);
    border-right: 1px solid var(--oly-color-error);
}

.bar-style-warning {
    border-bottom: 6px solid var(--oly-color-warning);
    border-top: 1px solid var(--oly-color-warning);
    border-left: 1px solid var(--oly-color-warning);
    border-right: 1px solid var(--oly-color-warning);
}

.bar-style-success {
    border-bottom: 6px solid var(--oly-color-success);
    border-top: 1px solid var(--oly-color-success);
    border-left: 1px solid var(--oly-color-success);
    border-right: 1px solid var(--oly-color-success);
}

.bar-style-info {
    border-bottom: 6px solid var(--oly-color-info);
    border-top: 1px solid var(--oly-color-info);
    border-left: 1px solid var(--oly-color-info);
    border-right: 1px solid var(--oly-color-info);
}

.bar-style-error .oly-bar-title {
    color: var(--oly-color-error);
}

.bar-style-warning .oly-bar-title {
    color: var(--oly-color-warning);
}

.bar-style-success .oly-bar-title {
    color: var(--oly-color-success);
}

.bar-style-info .oly-bar-title {
    color: var(--oly-color-info);
}


/* --- Bar Sections --- */
.oly-bar-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.oly-bar-icon svg {
    width: 100%;
    height: 100%;
}

.oly-bar-main-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
}

.oly-bar-text-wrapper {
    width: 343px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.oly-bar-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 140%; /* 22.4px */
    text-transform: uppercase;
}

.oly-bar-body {
    color: var(--oly-text-white);
    font-size: 16px;
    font-weight: 500;
    line-height: 140%; /* 22.4px */
}

.oly-bar-body p {
    margin: 0;
}

.oly-bar-cta a {
    color: var(--oly-text-white);
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    line-height: 100%; /* 16px */
    text-decoration-line: underline;
    text-transform: uppercase;
    white-space: nowrap; /* Prevent "View More" from wrapping */
}

.oly-bar-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oly-bar-close svg {
    display: block;
}


/* ===============================================
   TABLET STYLES
   =============================================== */
@media (max-width: 1024px) {
    .oly-notification-bar {
        top: 83px;
    }
}

/* ===============================================
   MOBILE STYLES
   =============================================== */
@media (max-width: 767px) {
    .oly-notification-wrapper {
        width: 100%;
        top: 60px;
        left: 0;
        transform: none; /* Reset centering */
        padding: 0;
    }

    .oly-notification-bar {
        width: 100%;
        transform: none; /* Reset centering */

        padding: 12px 8px 12px 12px;
        align-items: flex-start; /* Align items to top */

        border-radius: 0px 0px 8px 8px;
        border-top: none;
        border-right: none;
        border-left: none;
        /* The dynamic bottom border color remains */
    }

    .bar-style-error, .bar-style-warning, .bar-style-success, .bar-style-info {
        border-width: 0 0 4px 0;
        border-style: solid;
    }

    .oly-bar-icon {
        padding: 10px 6px;
        width: 36px;
        height: 44px;
    }

    .oly-bar-main-content {
        flex-direction: column; /* Stack text and CTA */
        align-items: flex-start;
        gap: 8px;
    }

    .oly-bar-text-wrapper {
        width: 100%; /* Allow text to use available space */
        flex-direction: column;
    }

    .oly-bar-close {
        padding: 14px 10px;
    }
}

/* ===============================================
   POPUP STYLES
   =============================================== */

:root {
    --oly-text-white: #FFF;
}

.oly-notification-popup-wrapper {
    position: fixed;
    top: 108px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99998;
    width: 100%;
    max-width: 1140px;
    padding: 0 16px;
    box-sizing: border-box;

    display: none;
    justify-content: flex-end;

    pointer-events: none;
}

.oly-notification-popup-wrapper:has(.oly-notification-popup-container.is-visible) {
    display: flex;
}

.oly-notification-popup-container {
    display: flex;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0s 0.4s, transform 0.3s ease-in-out;
    width: 458px;
    max-width: 100%;
    border-radius: 8px;
    background: rgba(41, 41, 53, 0.85);
    backdrop-filter: blur(7.5px);
    -webkit-backdrop-filter: blur(7.5px);
    padding: 36px 32px 32px;
    box-sizing: border-box;

    pointer-events: auto;
}

.oly-notification-popup-container.is-visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.3s ease-in-out;
}

.oly-popup-close-desktop {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 16px;
    height: 16px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.oly-popup-close-desktop:hover {
    opacity: 1;
}

.oly-popup-handle-mobile {
    display: none;
}

.oly-popup-content-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.oly-popup-column-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.oly-popup-column-image img {
    width: 154px;
    height: 154px;
    border-radius: 8px;
    object-fit: cover;
}

.oly-popup-title {
    color: var(--oly-text-white, #FFF);
    font-family: "Bebas Neue Pro", "Bebas Neue", sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 86%;
    text-transform: uppercase;
    margin: 0 0 12px 0;
}

.oly-popup-body {
    color: var(--oly-text-white, #FFF);
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 140%;
    margin-bottom: 20px;
}

.oly-popup-body p {
    margin: 0;
}

.oly-popup-cta {
    display: flex;
    padding: 12px 24px;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    background: #316EF7;
    margin-top: auto;
    color: var(--oly-text-white, #FFF);
    text-align: center;
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 100%;
    text-transform: uppercase;
    text-decoration: none;
}

.oly-popup-cta:hover {
    background: #254FAE;
    color: var(--oly-text-white, #FFF);
}

@media (min-width: 768px) and (max-width: 1024px) {
    .oly-notification-popup-container {
        top: 86px;
    }
}

@media (max-width: 767px) {
    .oly-notification-popup-wrapper {
        top: auto;
        bottom: 0;
        left: 0;
        transform: translateY(0);
        width: 100%;
        padding: 0;
    }

    .oly-notification-popup-container {
        width: 100%;
        display: flex;
        flex-direction: column;
        padding: 0;
        border-radius: 20px 20px 0 0;
    }

    .oly-popup-close-desktop {
        display: none;
    }

    .oly-popup-handle-mobile {
        display: flex;
        height: 38px;
        padding-top: 16px;
        padding-bottom: 16px;
        justify-content: center;
        align-items: center;
        flex-shrink: 0;
        cursor: grab;
        border-bottom: 1px solid #535374;
    }

    .oly-popup-handle-line {
        width: 65px;
        height: 5px;
        border-radius: 2.5px;
        background: #535374;
    }

    .oly-popup-content-wrapper {
        padding: 24px 8px 16px 16px;
        flex-direction: row;
        gap: 16px;
    }

    .oly-popup-column-image {
        order: 1;
    }

    .oly-popup-column-text {
        order: 2;
    }

    .oly-popup-column-image img {
        width: 84px;
        height: 84px;
    }

    .oly-popup-title {
        font-size: 20px;
        line-height: 100%;
        margin-bottom: 8px;
    }

    .oly-popup-body {
        font-size: 16px;
        line-height: 140%;
        margin-bottom: 0;
    }

    .oly-popup-cta {
        order: 3;
        display: flex;
        padding: 24px 16px 16px 16px;
        justify-content: flex-end;
        align-items: center;
        background: none;
        font-size: 14px;
        font-weight: 600;
        text-decoration-line: underline;
    }
}
