/* ===========================================
   ALLPOL DYNAMIC CONTENT SYSTEM - STYLES
   =========================================== */

/* ===== TOP BAR ===== */
.allpol-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.allpol-topbar.hidden {
    transform: translateY(-100%);
}

.allpol-topbar--urgent {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.allpol-topbar--info {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.allpol-topbar--success {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
}

.allpol-topbar--neutral {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: white;
}

.allpol-topbar__icon {
    font-size: 1.1rem;
}

.allpol-topbar__text {
    flex: 1;
    text-align: center;
}

.allpol-topbar__link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.allpol-topbar__close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: inherit;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.allpol-topbar__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Body offset when topbar is visible */
body.has-topbar {
    padding-top: 48px;
}

body.has-topbar .header {
    top: 48px;
}

/* ===== MODAL ===== */
.allpol-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.allpol-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.allpol-modal {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.allpol-modal-overlay.active .allpol-modal {
    transform: scale(1) translateY(0);
}

/* Animation variants */
.allpol-modal--zoom {
    transform: scale(0.5);
}

.allpol-modal-overlay.active .allpol-modal--zoom {
    transform: scale(1);
}

.allpol-modal--slide-up {
    transform: translateY(100px);
}

.allpol-modal-overlay.active .allpol-modal--slide-up {
    transform: translateY(0);
}

.allpol-modal--bounce {
    animation: modalBounce 0.5s ease forwards;
}

@keyframes modalBounce {
    0% {
        transform: scale(0.3);
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

.allpol-modal__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.allpol-modal__content {
    padding: 1.5rem;
}

.allpol-modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.allpol-modal__description {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.allpol-modal__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.allpol-modal__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.allpol-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background 0.2s;
}

.allpol-modal__close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* ===== TICKER ===== */
.allpol-ticker {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    overflow: hidden;
    white-space: nowrap;
    padding: 0.5rem 0;
}

.allpol-ticker--below-header {
    position: relative;
    z-index: 999;
}

.allpol-ticker--above-footer {
    margin-top: 2rem;
}

.allpol-ticker--floating {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

.allpol-ticker__track {
    display: flex;
    animation: tickerScroll 30s linear infinite;
}

.allpol-ticker--slow .allpol-ticker__track {
    animation-duration: 45s;
}

.allpol-ticker--fast .allpol-ticker__track {
    animation-duration: 15s;
}

@keyframes tickerScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.allpol-ticker__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 2rem;
    font-size: 0.9rem;
}

.allpol-ticker__separator {
    color: #64748b;
}

/* ===== SIDE BANNER ===== */
.allpol-side-banner {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9998;
    max-width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s, transform 0.4s;
}

.allpol-side-banner--right {
    right: -320px;
}

.allpol-side-banner--left {
    left: -320px;
}

.allpol-side-banner.active.allpol-side-banner--right {
    right: 1rem;
    opacity: 1;
    visibility: visible;
}

.allpol-side-banner.active.allpol-side-banner--left {
    left: 1rem;
    opacity: 1;
    visibility: visible;
}

.allpol-side-banner--bounce.active {
    animation: sideBannerBounce 0.6s ease;
}

@keyframes sideBannerBounce {
    0% {
        transform: translateY(-50%) scale(0.8);
    }

    50% {
        transform: translateY(-50%) scale(1.05);
    }

    100% {
        transform: translateY(-50%) scale(1);
    }
}

.allpol-side-banner__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1;
}

.allpol-side-banner__image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.allpol-side-banner__content {
    padding: 1rem;
}

.allpol-side-banner__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.allpol-side-banner__description {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.allpol-side-banner__cta {
    display: block;
    text-align: center;
    padding: 0.625rem 1rem;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ===== COUNTDOWN ===== */
.allpol-countdown {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    padding: 1rem;
}

.allpol-countdown__item {
    text-align: center;
}

.allpol-countdown__value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    min-width: 60px;
    display: block;
}

.allpol-countdown__label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* Countdown - Digital style */
.allpol-countdown--digital .allpol-countdown__value {
    font-family: 'Courier New', monospace;
    background: #0f172a;
    color: #22c55e;
    border: 2px solid #22c55e;
}

/* Countdown - Flip style */
.allpol-countdown--flip .allpol-countdown__value {
    background: #1e293b;
    color: white;
    box-shadow: 0 4px 0 #0f172a;
}

/* Countdown - Minimal style */
.allpol-countdown--minimal .allpol-countdown__value {
    background: transparent;
    font-size: 2.5rem;
}

.allpol-countdown--minimal .allpol-countdown__item:not(:last-child)::after {
    content: ':';
    font-size: 2rem;
    color: #64748b;
    margin-left: 0.5rem;
}

/* ===== STATUS BAR ===== */
.allpol-status-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.allpol-status-bar--operational {
    background: #dcfce7;
    color: #166534;
}

.allpol-status-bar--delays {
    background: #fef3c7;
    color: #92400e;
}

.allpol-status-bar--closed {
    background: #fee2e2;
    color: #991b1b;
}

.allpol-status-bar--whatsapp-only {
    background: #dbeafe;
    color: #1e40af;
}

.allpol-status-bar__icon {
    font-size: 1rem;
}

/* ===== PRODUCT BADGES ===== */
.allpol-product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 10;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ===== LOGO BADGE ===== */
.allpol-logo-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    animation: logoBadgeBounce 1s ease infinite;
}

@keyframes logoBadgeBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .allpol-topbar {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    .allpol-modal {
        max-width: 95%;
    }

    .allpol-side-banner {
        max-width: 280px;
    }

    .allpol-countdown__value {
        font-size: 1.5rem;
        min-width: 45px;
        padding: 0.375rem 0.5rem;
    }
}