/* ================================================
   PREMIUM SAFETY ALERT BANNER
   Improved Mobile & Desktop Styling
   ================================================ */

/* Overlay backdrop */
.safety-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99998;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.safety-alert-overlay.show {
    display: block;
    opacity: 1;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Alert Banner */
.safety-alert-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    max-width: 650px;
    width: calc(100% - 40px);
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg,
        rgba(30, 20, 20, 0.98) 0%,
        rgba(40, 25, 25, 0.98) 50%,
        rgba(30, 20, 20, 0.98) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    padding: 35px 30px;
    border-radius: 20px;
    z-index: 99999;
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(239, 68, 68, 0.3),
        0 0 60px rgba(239, 68, 68, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(251, 191, 36, 0.4);
    display: none;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.safety-alert-banner.show {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    animation: alertBounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes alertBounceIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Pulsing glow effect */
.safety-alert-banner::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(251, 191, 36, 0.3));
    z-index: -1;
    animation: alertPulseGlow 2.5s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes alertPulseGlow {
    0%, 100% {
        opacity: 0.4;
        filter: blur(10px);
    }
    50% {
        opacity: 0.8;
        filter: blur(15px);
    }
}

/* Header */
.safety-alert-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 26px;
    font-weight: 900;
    color: #fbbf24;
    text-shadow: 0 0 15px rgba(251, 191, 36, 0.8), 0 2px 8px rgba(0, 0, 0, 0.6);
    text-align: center;
    flex-wrap: wrap;
}

/* Icon - using SVG instead of emoji */
.safety-alert-icon {
    font-size: 42px;
    display: inline-block;
    animation: warningPulse 1.5s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.8));
    }
    50% {
        transform: scale(1.15);
        filter: drop-shadow(0 0 16px rgba(239, 68, 68, 1));
    }
}

/* Content */
.safety-alert-content {
    font-size: 16px;
    line-height: 1.85;
    margin-bottom: 28px;
    color: #e5e7eb;
    text-align: left;
}

.safety-alert-content p {
    margin-bottom: 16px;
}

.safety-alert-content strong {
    color: #fbbf24;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Button */
.safety-alert-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow:
        0 6px 24px rgba(251, 191, 36, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.safety-alert-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.safety-alert-button:hover {
    transform: translateY(-3px);
    box-shadow:
        0 10px 35px rgba(251, 191, 36, 0.7),
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.safety-alert-button:hover::before {
    transform: translateX(100%);
}

.safety-alert-button:active {
    transform: translateY(-1px);
    box-shadow:
        0 5px 20px rgba(251, 191, 36, 0.6),
        0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

/* Tablets */
@media (max-width: 768px) {
    .safety-alert-banner {
        width: calc(100% - 30px);
        padding: 30px 24px;
        max-height: 85vh;
        border-radius: 16px;
    }

    .safety-alert-header {
        font-size: 22px;
        margin-bottom: 20px;
        gap: 10px;
    }

    .safety-alert-icon {
        font-size: 38px;
    }

    .safety-alert-content {
        font-size: 15px;
        line-height: 1.75;
        margin-bottom: 24px;
    }

    .safety-alert-button {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .safety-alert-banner {
        width: calc(100% - 20px);
        padding: 24px 18px;
        max-height: 88vh;
        border-radius: 14px;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    .safety-alert-banner.show {
        transform: translate(-50%, -50%) scale(1);
    }

    .safety-alert-header {
        font-size: 19px;
        margin-bottom: 18px;
        gap: 8px;
        flex-direction: column;
    }

    .safety-alert-icon {
        font-size: 36px;
    }

    .safety-alert-content {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 20px;
    }

    .safety-alert-content p {
        margin-bottom: 14px;
    }

    .safety-alert-button {
        padding: 13px 18px;
        font-size: 14px;
        letter-spacing: 0.3px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .safety-alert-banner {
        width: calc(100% - 16px);
        padding: 20px 16px;
    }

    .safety-alert-header {
        font-size: 17px;
        margin-bottom: 16px;
    }

    .safety-alert-icon {
        font-size: 32px;
    }

    .safety-alert-content {
        font-size: 13px;
        line-height: 1.65;
        margin-bottom: 18px;
    }

    .safety-alert-button {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* Landscape orientation - compact version */
@media (max-height: 600px) and (orientation: landscape) {
    .safety-alert-banner {
        max-height: 95vh;
        padding: 20px;
        width: calc(100% - 60px);
        max-width: 580px;
    }

    .safety-alert-header {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .safety-alert-icon {
        font-size: 32px;
    }

    .safety-alert-content {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 16px;
    }

    .safety-alert-content p {
        margin-bottom: 10px;
    }

    .safety-alert-button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Accessibility - reduced motion */
@media (prefers-reduced-motion: reduce) {
    .safety-alert-banner,
    .safety-alert-overlay,
    .safety-alert-icon,
    .safety-alert-button {
        animation: none;
        transition: opacity 0.2s ease;
    }

    .safety-alert-banner::before {
        animation: none;
        opacity: 0.5;
    }
}

/* Scrollbar styling for alert content */
.safety-alert-banner::-webkit-scrollbar {
    width: 8px;
}

.safety-alert-banner::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
}

.safety-alert-banner::-webkit-scrollbar-thumb {
    background: rgba(251, 191, 36, 0.5);
    border-radius: 10px;
}

.safety-alert-banner::-webkit-scrollbar-thumb:hover {
    background: rgba(251, 191, 36, 0.7);
}
