/**
 * Estilos para el sistema de notificaciones
 * @package HelloElementorChild
 */

/* ================================================
   BOTÓN DE NOTIFICACIONES
   ================================================ */

.gd-modal-close {
    background: none;
    border: none !important;
    font-size: 24px !important;
    color: #fff !important;
    cursor: pointer !important;
    padding: 5px !important;
    border-radius: 50% !important;
    width: 35px !important;
    height: 35px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}

.gd-icono-notificaciones {
    position: relative;
    display: inline-block;
}

.gd-btn-notificaciones {
    background: #2c5aa0;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gd-btn-notificaciones svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    pointer-events: none;
}

.gd-btn-notificaciones:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

.gd-notificaciones-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #fff;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ================================================
   MODAL DE NOTIFICACIONES
   ================================================ */

.gd-modal-notificaciones {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.gd-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modal-appear 0.3s ease-out;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.gd-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.gd-modal-header h3 {
    margin: 0;
    font-size: 20px !important;
    font-weight: 600;
    color: #000;;
    font-family: 'Montserrat', sans-serif;
}

.gd-modal-close:hover {
    background: #e9ecef;
    color: #495057;
}

.gd-modal-body {
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
}

/* ================================================
   LOADER
   ================================================ */

.gd-loader {
    padding: 40px;
    text-align: center;
    color: #6c757d;
}

.gd-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================================================
   LISTA DE NOTIFICACIONES
   ================================================ */

.gd-notificaciones-lista {
    padding: 0;
}

.gd-notificacion-item {
    display: flex;
    align-items: flex-start;
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
    gap: 15px;
}

.gd-notificacion-item:hover {
    background: #f8f9fa;
}

.gd-notificacion-item:last-child {
    border-bottom: none;
}

.gd-notificacion-icon {
    width: 40px;
    height: 40px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c5aa0;
    font-size: 16px;
    flex-shrink: 0;
}

.gd-notificacion-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.gd-notificacion-contenido {
    flex: 1;
    min-width: 0;
}

.gd-notificacion-texto {
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 5px;
    font-family: 'Montserrat', sans-serif;
}

.gd-notificacion-texto strong {
    color: #2c5aa0;
    font-weight: 600;
}

.gd-notificacion-tiempo {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.gd-notificacion-acciones {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gd-btn-ver {
    background: #2c5aa0;
    color: #fff;
    border: none;
    border-radius: 6px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.gd-btn-ver svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.gd-btn-ver:hover {
    background: #1e3a6f;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* ================================================
   ESTADOS ESPECIALES
   ================================================ */

.gd-sin-notificaciones {
    padding: 60px 25px;
    text-align: center;
    color: #6c757d;
}

.gd-sin-notificaciones p {
    margin: 0;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
}

.gd-notificacion-error {
    padding: 40px 25px;
    text-align: center;
    color: #e74c3c;
}

.gd-notificacion-error svg {
    width: 24px;
    height: 24px;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    fill: currentColor;
}

.gd-notificacion-error p {
    margin: 0;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 768px) {
    .gd-modal-content {
        width: 95%;
        max-height: 90vh;
        margin: 20px;
    }
    
    .gd-modal-header {
        padding: 15px 20px;
    }
    
    .gd-modal-header h3 {
        font-size: 18px;
    }
    
    .gd-notificacion-item {
        padding: 15px 20px;
        gap: 12px;
    }
    
    .gd-notificacion-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .gd-notificacion-texto {
        font-size: 13px;
    }
    
    .gd-btn-ver {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* ================================================
   PREVENIR SCROLL EN BODY CUANDO MODAL ESTÁ ABIERTO
   ================================================ */

body.gd-modal-abierto {
    overflow: hidden;
}

/* ================================================
   ACCESIBILIDAD
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    .gd-btn-notificaciones,
    .gd-modal-content,
    .gd-notificacion-item,
    .gd-btn-ver {
        transition: none;
    }
    
    .gd-notificaciones-badge {
        animation: none;
    }
    
    .gd-spinner {
        animation: none;
    }
    
    @keyframes modal-appear {
        from, to {
            opacity: 1;
            transform: none;
        }
    }
}
button#notificaciones, button#notificaciones:hover {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

button#notificaciones:hover {
    transform: scale(1.05)
}