/* ============================================
   MODAL AUTENTICAZIONE - CDM86
   Modal animata per scelta tipo utente
   ============================================ */

/* Overlay */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.auth-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Modal Container */
.auth-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    max-width: 600px;
    width: 90%;
    padding: 0;
    position: relative;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-modal-overlay.active .auth-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Header */
.auth-modal-header {
    padding: 40px 40px 30px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px 24px 0 0;
    color: white;
    position: relative;
}

.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.auth-modal-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.auth-modal-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.auth-modal-subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
    font-weight: 400;
}

/* Body */
.auth-modal-body {
    padding: 40px;
}

.auth-modal-description {
    text-align: center;
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Options Grid */
.auth-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* Option Card */
.auth-option {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.auth-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-option:hover {
    transform: translateY(-8px);
    border-color: #667eea;
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.3);
}

.auth-option:hover::before {
    opacity: 0.05;
}

.auth-option:active {
    transform: translateY(-4px) scale(0.98);
}

.auth-option-content {
    position: relative;
    z-index: 1;
}

.auth-option-icon {
    font-size: 56px;
    margin-bottom: 16px;
    display: block;
    transition: transform 0.3s ease;
}

.auth-option:hover .auth-option-icon {
    transform: scale(1.1);
}

.auth-option-title {
    font-size: 20px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 8px;
}

.auth-option-description {
    font-size: 14px;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

/* Badge */
.auth-option-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Divider */
.auth-modal-divider {
    text-align: center;
    color: #adb5bd;
    font-size: 14px;
    margin: 24px 0;
    position: relative;
}

.auth-modal-divider::before,
.auth-modal-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #dee2e6;
}

.auth-modal-divider::before {
    left: 0;
}

.auth-modal-divider::after {
    right: 0;
}

/* Login Link */
.auth-modal-login {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.auth-modal-login p {
    color: #6c757d;
    font-size: 15px;
    margin: 0 0 12px;
}

.auth-modal-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-modal-login-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* Responsive */
@media (max-width: 640px) {
    .auth-modal {
        width: 95%;
        max-width: none;
    }

    .auth-modal-header {
        padding: 30px 24px 24px;
    }

    .auth-modal-title {
        font-size: 26px;
    }

    .auth-modal-subtitle {
        font-size: 14px;
    }

    .auth-modal-body {
        padding: 24px;
    }

    .auth-options {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .auth-option {
        padding: 24px 20px;
    }

    .auth-option-icon {
        font-size: 48px;
    }

    .auth-option-title {
        font-size: 18px;
    }
}

/* Animazioni */
@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.auth-option {
    animation: slideInUp 0.5s ease forwards;
}

.auth-option:nth-child(1) {
    animation-delay: 0.1s;
}

.auth-option:nth-child(2) {
    animation-delay: 0.2s;
}
