/* Estilos para notificaciones de Firebase */
/* Global Alert Styles */
.global-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(-100%);
    transition: all 0.5s ease-in-out;
}

.global-alert.transform-none {
    transform: translateY(0);
}

.global-alert-container {
    width: 100%;
    background-color: #1e40af; /* Cambiado a un azul más profesional */
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.global-alert-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
}

.global-alert-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-icon {
    flex-shrink: 0;
}

.alert-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.alert-text {
    flex: 1;
}

.alert-text h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.alert-text p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin: 0.25rem 0 0 0;
}

.alert-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reload-button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: white;
    color: #1e40af; /* Actualizado para coincidir con el nuevo color */
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reload-button:hover {
    background-color: #f8fafc;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.reload-button svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
}

.close-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.close-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

#global-alert-notification.hidden {
    display: none;
}

/* Dark mode styles for global alert */
.dark .global-alert-container {
    background-color: #991b1b;
}

.dark .reload-button {
    background-color: #1f2937;
    color: white;
}

.dark .reload-button:hover {
    background-color: #374151;
}

.dark .close-button {
    background-color: rgba(0, 0, 0, 0.2);
}

.dark .close-button:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Estilos para el backdrop de notificaciones */
.notification-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99998;
}

.custom-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.notification-content {
    max-width: 28rem;
    width: 100%;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 1.5rem;
    border-left: 4px solid #ef4444;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

.notification-content .notification-title {
    font-weight: bold;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: #111827;
}

.notification-content .notification-body {
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.625;
    margin-bottom: 1rem;
}

.alert-detail-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #2563eb;
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    margin-right: 1rem;
}

.alert-detail-btn:hover {
    background-color: #1d4ed8;
}

.stop-audio-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #dc2626;
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    animation: pulse 2s infinite;
}

.stop-audio-btn:hover {
    background-color: #b91c1c;
}

.close-notification-btn {
    color: #9ca3af;
    border-radius: 9999px;
    padding: 0.5rem;
    transition: all 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.25rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-notification-btn:hover {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* Dark mode */
.dark .notification-content {
    background-color: #1f2937;
    border-color: #374151;
}

.dark .notification-content .notification-title {
    color: #f3f4f6;
}

.dark .notification-content .notification-body {
    color: #d1d5db;
}

.dark .close-notification-btn:hover {
    background-color: #374151;
    color: #e5e7eb;
}

/* Audio Permission Overlay */
.audio-permission-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.audio-permission-modal {
    max-width: 24rem;
    width: 100%;
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    padding: 2rem;
    text-align: center;
    transform: scale(1.05);
    animation: modalAppear 0.3s ease-out;
}

.dark .audio-permission-modal {
    background-color: #1f2937;
    color: #f3f4f6;
}

.audio-permission-modal h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
}

.dark .audio-permission-modal h2 {
    color: #f3f4f6;
}

.audio-permission-modal p {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.dark .audio-permission-modal p {
    color: #d1d5db;
}

.audio-permission-icon {
    margin: 0 auto 1rem;
    width: 4rem;
    height: 4rem;
    color: #3b82f6;
    animation: bounce 2s infinite;
}

.enable-audio-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: #3b82f6;
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.enable-audio-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.skip-audio-btn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem;
    color: #6b7280;
    font-size: 0.75rem;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.skip-audio-btn:hover {
    color: #374151;
}

.dark .skip-audio-btn {
    color: #9ca3af;
}

.dark .skip-audio-btn:hover {
    color: #d1d5db;
}

@keyframes modalAppear {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: scale(1.05) translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -10px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -5px, 0);
    }
    90% {
        transform: translate3d(0,-2px,0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}