.radiohy-alert-backdrop {
    position: fixed;
    inset: 0;
    z-index: 101140;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.radiohy-alert-popup {
    position: fixed;
    z-index: 101150;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(440px, calc(100vw - 24px));
    max-height: min(85vh, 640px);
    font-family: inherit;
}

.radiohy-alert-popup[hidden],
.radiohy-alert-backdrop[hidden] {
    display: none !important;
}

.radiohy-alert-popup-inner {
    display: flex;
    flex-direction: column;
    max-height: inherit;
    background: linear-gradient(160deg, #151922 0%, #0b0d14 100%);
    border: 2px solid #ffcc00;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), 0 0 32px rgba(255, 204, 0, 0.18);
    color: #fff;
    overflow: hidden;
}

.radiohy-alert-popup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 204, 0, 0.22);
    background: rgba(255, 204, 0, 0.08);
}

.radiohy-alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffcc00;
}

.radiohy-alert-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffcc00;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
}

.radiohy-alert-close {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.radiohy-alert-close:hover {
    border-color: #ffcc00;
    color: #ffcc00;
}

.radiohy-alert-popup-body {
    padding: 18px 18px 8px;
    overflow-y: auto;
}

.radiohy-alert-title {
    margin: 0 0 10px;
    font-size: 1.25rem;
    line-height: 1.25;
    color: #fff;
}

.radiohy-alert-message {
    font-size: 0.98rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
    white-space: pre-wrap;
}

.radiohy-alert-actions {
    margin-top: 14px;
}

.radiohy-alert-link {
    display: inline-block;
    text-decoration: none !important;
    background: linear-gradient(135deg, #ffcc00, #ffb300) !important;
    border: none !important;
    color: #111 !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    padding: 8px 18px !important;
}

.radiohy-alert-popup-foot {
    padding: 12px 18px 16px;
    display: flex;
    justify-content: flex-end;
}

.radiohy-alert-popup-foot .button-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 999px;
    min-height: 40px;
    padding: 0 18px;
}

.radiohy-alert-popup-foot .button-secondary:hover {
    border-color: #ffcc00;
    color: #ffcc00;
}

/* Type accents */
.radiohy-alert-popup.type-live .radiohy-alert-popup-inner {
    border-color: #ff3366;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), 0 0 32px rgba(255, 51, 102, 0.22);
}

.radiohy-alert-popup.type-live .radiohy-alert-badge {
    color: #ff6699;
}

.radiohy-alert-popup.type-live .radiohy-alert-badge::before {
    background: #ff3366;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.9);
    animation: radiohy-alert-pulse 1.4s ease-in-out infinite;
}

.radiohy-alert-popup.type-warning .radiohy-alert-popup-inner {
    border-color: #ff9800;
}

.radiohy-alert-popup.type-warning .radiohy-alert-badge {
    color: #ffb74d;
}

.radiohy-alert-popup.type-warning .radiohy-alert-badge::before {
    background: #ff9800;
    box-shadow: 0 0 10px rgba(255, 152, 0, 0.8);
}

.radiohy-alert-popup.type-success .radiohy-alert-popup-inner {
    border-color: #00e676;
}

.radiohy-alert-popup.type-success .radiohy-alert-badge {
    color: #69f0ae;
}

.radiohy-alert-popup.type-success .radiohy-alert-badge::before {
    background: #00e676;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.8);
}

@keyframes radiohy-alert-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.85); }
}

body.radiohy-alert-open {
    overflow: hidden;
}

@media (max-width: 640px) {
    .radiohy-alert-popup {
        left: 50%;
        right: auto;
        top: auto;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        transform: translateX(-50%);
        width: min(320px, calc(100vw - 28px));
        max-height: min(58vh, 380px);
    }

    .radiohy-alert-popup-inner {
        border-radius: 14px;
        border-width: 1px;
    }

    .radiohy-alert-popup-head {
        padding: 8px 10px;
        gap: 8px;
    }

    .radiohy-alert-badge {
        font-size: 0.68rem;
    }

    .radiohy-alert-close {
        width: 28px;
        height: 28px;
        font-size: 1.15rem;
        border-radius: 6px;
    }

    .radiohy-alert-popup-body {
        padding: 10px 12px 4px;
    }

    .radiohy-alert-title {
        font-size: 0.98rem;
        margin-bottom: 6px;
        line-height: 1.2;
    }

    .radiohy-alert-message {
        font-size: 0.84rem;
        line-height: 1.4;
    }

    .radiohy-alert-actions {
        margin-top: 10px;
    }

    .radiohy-alert-link {
        padding: 6px 14px !important;
        font-size: 0.84rem !important;
    }

    .radiohy-alert-popup-foot {
        padding: 8px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .radiohy-alert-popup-foot .button-secondary {
        min-height: 34px;
        padding: 0 14px;
        font-size: 0.84rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .radiohy-alert-popup.type-live .radiohy-alert-badge::before {
        animation: none;
    }
}
