/* ============================================
   SSO365 Error Handling Styles
   UNAB Bienvenidas24 - v1.0.0
   ============================================ */

/* Loading Overlay */
.sso-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 51, 97, 0.95);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.sso-loading.active {
    display: flex;
}

.sso-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: sso-spin 1s linear infinite;
}

@keyframes sso-spin {
    to { transform: rotate(360deg); }
}

/* Error Modal */
.sso-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: sso-fadeIn 0.3s;
}

.sso-modal {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: sso-slideUp 0.3s;
}

.sso-modal-header {
    background: #E6332A;
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
}

.sso-modal-body {
    padding: 30px;
    text-align: center;
}

.sso-modal-footer {
    padding: 20px 30px 30px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* Buttons */
.sso-btn-primary {
    background: #113361;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.sso-btn-primary:hover {
    background: #0d2647;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(17, 51, 97, 0.3);
    color: white;
    text-decoration: none;
}

.sso-btn-secondary {
    background: white;
    color: #666;
    border: 1px solid #ddd;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.sso-btn-secondary:hover {
    border-color: #113361;
    color: #113361;
    text-decoration: none;
}

/* Animations */
@keyframes sso-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes sso-fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes sso-slideUp {
    from { 
        transform: translateY(50px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

/* Responsive */
@media (max-width: 576px) {
    .sso-modal {
        width: 95%;
        margin: 10px;
    }
    
    .sso-modal-body {
        padding: 20px;
    }
    
    .sso-modal-footer {
        flex-direction: column;
    }
    
    .sso-btn-primary,
    .sso-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Accessibility */
.sso-modal:focus {
    outline: 2px solid #113361;
    outline-offset: 2px;
}

.sso-btn-primary:focus,
.sso-btn-secondary:focus {
    outline: 2px solid #113361;
    outline-offset: 2px;
}
