/* ============================================================
   Echorouk Push — Frontend Banner & Subscribed Widget
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

/* ---- Header .echorouk-alert-link button states ---- */

/* Base: ensure pointer cursor and smooth transitions */
.echorouk-alert-link {
    cursor: pointer;
    transition: opacity 0.2s, color 0.2s;
    text-decoration: none !important;
}

/* Subscribed: green accent */
.echorouk-alert-link.ep-state-subscribed {
    color: #9BACBF !important;
    opacity: 1;
}

/* Unsubscribed: default inherited style, no override needed */
.echorouk-alert-link.ep-state-unsubscribed {
    opacity: 1;
}

/* Denied: dimmed */
.echorouk-alert-link.ep-state-denied {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading: pulse animation */
.echorouk-alert-link.ep-state-loading {
    opacity: 0.6;
    animation: ep-pulse 0.8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes ep-pulse {
    from {
        opacity: 0.6;
    }

    to {
        opacity: 1;
    }
}

/* ---- Permission Banner ---- */
#ep-push-banner {
    position: fixed;
    bottom: -120px;
    left: 0;
    right: 0;
    z-index: 99999;
    transition: bottom 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

#ep-push-banner.ep-banner--visible {
    bottom: 0;
}

#ep-push-banner.ep-banner--hiding {
    bottom: -120px;
    transition: bottom 0.3s ease-in;
}

.ep-banner__inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-top: 3px solid #e63946;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
    flex-wrap: wrap;
}

.ep-banner__icon {
    font-size: 24px;
    flex-shrink: 0;
    animation: ep-ring 1.5s ease-in-out infinite;
}

@keyframes ep-ring {

    0%,
    100% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(15deg);
    }

    20% {
        transform: rotate(-10deg);
    }

    30% {
        transform: rotate(8deg);
    }

    40% {
        transform: rotate(0deg);
    }
}

.ep-banner__text {
    flex: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ep-banner__title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.ep-banner__body {
    color: #a8b2c1;
    font-size: 13px;
}

.ep-banner__actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ep-btn {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s;
}

.ep-btn:active {
    transform: scale(0.96);
}

.ep-btn--allow {
    background: linear-gradient(135deg, #e63946, #c1121f);
    color: #fff;
    padding: 9px 20px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.45);
}

.ep-btn--allow:hover {
    box-shadow: 0 6px 16px rgba(230, 57, 70, 0.6);
    transform: translateY(-1px);
}

.ep-btn--deny {
    background: rgba(255, 255, 255, 0.08);
    color: #a8b2c1;
    padding: 9px 14px;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ep-btn--deny:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.ep-btn--close {
    background: transparent;
    color: #5a6778;
    font-size: 16px;
    padding: 4px 8px;
    margin-right: auto;
    flex-shrink: 0;
}

.ep-btn--close:hover {
    color: #fff;
}

/* ---- Subscribed Widget ---- */
#ep-subscribed-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(26, 26, 46, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(230, 57, 70, 0.4);
    border-radius: 40px;
    color: #e0e6ef;
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    direction: rtl;
    animation: ep-fade-in 0.4s ease;
}

@keyframes ep-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ep-widget__icon {
    font-size: 16px;
}

.ep-widget__unsub {
    background: none;
    border: none;
    color: #e63946;
    font-family: 'Cairo', sans-serif;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .ep-banner__inner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .ep-banner__actions {
        width: 100%;
        justify-content: center;
    }

    .ep-btn--close {
        position: absolute;
        top: 8px;
        left: 8px;
        margin: 0;
    }
}