/**
 * Top Banner - Frontend Styles
 */

/* Base banner styles */
.topbanner {
    background-color: var(--topbanner-bg, #1a1a2e);
    color: var(--topbanner-text, #ffffff);
    padding: 12px 50px 12px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.4;
    position: relative;
    z-index: 99999;
    box-sizing: border-box;
}

/* Fallback positioning for themes without wp_body_open */
.topbanner--fallback {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

/* Content container */
.topbanner__content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    text-align: center;
}

/* Text container */
.topbanner__text {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Title */
.topbanner__title {
    font-weight: 600;
    font-size: 15px;
}

/* Subtitle */
.topbanner__subtitle {
    opacity: 0.9;
    font-size: 14px;
}

/* Button */
.topbanner__button {
    background-color: var(--topbanner-btn-bg, #e94560);
    color: var(--topbanner-btn-text, #ffffff);
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.topbanner__button:hover,
.topbanner__button:focus {
    opacity: 0.85;
    transform: translateY(-1px);
    color: var(--topbanner-btn-text, #ffffff);
    text-decoration: none;
}

/* Dismiss button */
.topbanner__dismiss {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--topbanner-text, #ffffff);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 5px 10px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.topbanner__dismiss:hover,
.topbanner__dismiss:focus {
    opacity: 1;
    outline: none;
}

/* Hidden state */
.topbanner--hidden {
    display: none !important;
}

/* Dismiss animation */
.topbanner--dismissing {
    animation: topbanner-slide-up 0.3s ease-out forwards;
}

@keyframes topbanner-slide-up {
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .topbanner {
        padding: 10px 45px 10px 15px;
        font-size: 13px;
    }

    .topbanner__content {
        flex-direction: column;
        gap: 8px;
    }

    .topbanner__text {
        flex-direction: column;
        gap: 4px;
    }

    .topbanner__title {
        font-size: 14px;
    }

    .topbanner__subtitle {
        font-size: 13px;
    }

    .topbanner__button {
        padding: 8px 16px;
        font-size: 13px;
    }

    .topbanner__dismiss {
        right: 8px;
        font-size: 18px;
        padding: 4px 8px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .topbanner {
        padding: 8px 40px 8px 12px;
    }

    .topbanner__title {
        font-size: 13px;
    }

    .topbanner__subtitle {
        font-size: 12px;
    }

    .topbanner__button {
        padding: 6px 14px;
        font-size: 12px;
    }
}
