/* Hide Vue elements until Vue is ready */
[v-cloak] {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

.modal-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #444;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-footer {
    text-align: center;
    padding: 0 2rem 2rem;
    color: #666;
}

.modal-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.modal-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 2rem;
    text-align: center;
    font-size: 0.95rem;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 2rem;
    text-align: center;
    font-size: 0.95rem;
}

/* ===== RESPONSIVE STYLES ===== */

/* Mobile */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-container {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        animation: slideUp 0.3s ease;
    }
    
    .modal-header {
        padding: 1.5rem 1.25rem 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-close {
        font-size: 1.75rem;
    }
    
    .modal-form {
        padding: 1.25rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 12px;
    }
    
    .submit-btn {
        padding: 1rem;
        font-size: 1rem;
        border-radius: 12px;
    }
    
    .modal-footer {
        padding: 0 1.25rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .error-message,
    .success-message {
        margin: 0.75rem 1.25rem;
        padding: 0.875rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .modal-container {
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1.25rem 1rem 0.875rem;
    }
    
    .modal-header h2 {
        font-size: 1.15rem;
    }
    
    .modal-form {
        padding: 1rem;
    }
    
    .form-group input {
        padding: 0.875rem;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
