/* RF Rotating Banner - Frontend Styles */

#rf-rotating-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99998; /* Below WordPress admin bar (99999) but above content */
    background: #006080;
    color: #fff;
    font-family: var(--wp--preset--font-family--system-font), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    height: 58px; /* Fixed total banner height */
}

.rf-banner-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    height: 100%; /* Fill parent container */
}

.rf-banner-slide.active {
    display: block;
    opacity: 1;
}

.rf-banner-slide a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%; /* Fill parent slide */
}

.rf-banner-slide a:hover .rf-banner-text {
    background: linear-gradient(135deg, #007a9e 0%, #009ec4 100%);
    transform: scale(1.01);
    box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.3);
}

.rf-banner-slide a:hover .rf-banner-text-overlay {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Text-only banner */
.rf-banner-text {
    padding: 10px 20px 24px 20px;
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
    background: linear-gradient(135deg, #006080 0%, #007a9e 100%);
    transition: all 0.4s ease;
    position: relative;
    height: 100%; /* Fill parent container */
    min-height: 58px; /* Ensure minimum height */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    letter-spacing: 0.3px;
    box-sizing: border-box;
}

/* Image banner with overlay */
.rf-banner-image {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rf-banner-text-overlay {
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    max-width: 80%;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.rf-banner-text-overlay::after {
    content: '→';
    margin-left: 8px;
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 1.1em;
}

.rf-banner-slide a:hover .rf-banner-text-overlay::after {
    transform: translateX(5px);
}

/* Marketing enhancement: Add subtle pulse animation */
@keyframes rf-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
}

@keyframes rf-shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.rf-banner-text {
    animation: rf-pulse 3s ease-in-out infinite;
}

.rf-banner-slide a .rf-banner-text::after {
    content: '→';
    margin-left: 8px;
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 1.1em;
}

.rf-banner-slide a:hover .rf-banner-text::after {
    transform: translateX(5px);
}

/* Add shimmer effect on hover for extra attention */
.rf-banner-slide a:hover .rf-banner-text {
    background: linear-gradient(135deg, #007a9e 0%, #009ec4 50%, #007a9e 100%);
    background-size: 200% 100%;
    animation: rf-shimmer 2s linear infinite, rf-pulse 3s ease-in-out infinite;
}

/* Navigation dots */
.rf-banner-nav {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
    padding: 3px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.rf-banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.rf-banner-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

.rf-banner-dot.active {
    background: #fff;
    width: 10px;
    height: 10px;
}

/* Close button - optional */
.rf-banner-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 11;
}

.rf-banner-close:hover {
    opacity: 1;
}

/* Position banner below admin bar when logged in */
body.admin-bar #rf-rotating-banner {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar #rf-rotating-banner {
        top: 46px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    #rf-rotating-banner {
        height: 56px;
    }

    .rf-banner-text {
        padding: 9px 15px 22px 15px;
        font-size: 13px;
        min-height: 56px;
    }

    .rf-banner-nav {
        bottom: 5px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    #rf-rotating-banner {
        height: 52px;
    }

    .rf-banner-text {
        padding: 8px 12px 20px 12px;
        font-size: 12px;
        min-height: 52px;
    }

    .rf-banner-nav {
        bottom: 4px;
        padding: 2px 10px;
    }

    .rf-banner-dot {
        width: 7px;
        height: 7px;
    }

    .rf-banner-dot.active {
        width: 9px;
        height: 9px;
    }
}

/* Image banners (if used) */
.rf-banner-image {
    min-height: 200px;
}

@media (max-width: 768px) {
    .rf-banner-image {
        min-height: 150px;
    }

    .rf-banner-text-overlay {
        font-size: 14px;
        padding: 12px 20px;
        max-width: 90%;
    }
}

@media (max-width: 480px) {
    .rf-banner-image {
        min-height: 120px;
    }

    .rf-banner-text-overlay {
        font-size: 13px;
        padding: 10px 15px;
    }
}
