/* Authentication Modal Styles */

.auth-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: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.auth-modal-overlay.show {
    opacity: 1;
}

.auth-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
    margin: 20px;
}

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

.auth-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0 24px;
    border-bottom: none;
}

.auth-modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    color: #202124;
    line-height: 1.3;
}

.auth-modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    color: #5f6368;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-close:hover {
    background: #f1f3f4;
}

.auth-modal-close i {
    font-size: 20px;
}

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

.auth-form {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 16px;
    color: #202124;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #e7c54d;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.form-input::placeholder {
    color: #9aa0a6;
}

.form-actions {
    margin: 24px 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
    min-height: 48px;
}

.btn-primary {
    background: #e7c54d;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #d4af37;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-primary:disabled {
    background: #dadce0;
    color: #9aa0a6;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: #e7c54d;
    border: 1px solid #dadce0;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #e7c54d;
}

.btn-secondary.success {
    background: #e8f5e8;
    color: #137333;
    border-color: #137333;
}

.btn-full {
    width: 100%;
}

.btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #9aa0a6;
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8eaed;
}

.auth-divider span {
    margin: 0 16px;
}

.auth-switch {
    text-align: center;
}

.auth-switch p {
    margin: 0;
    font-size: 14px;
    color: #5f6368;
}

.link-btn {
    background: none;
    border: none;
    color: #e7c54d;
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
    padding: 0;
    margin: 0 0 0 4px;
}

.link-btn:hover {
    text-decoration: none;
}

.auth-result {
    display: none;
    margin-top: 16px;
}

.auth-result.error {
    color: #d93025;
}

.auth-result.success {
    color: #137333;
}

.result-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #f8f9fa;
    font-size: 14px;
}

.auth-result.error .result-message {
    background: #fce8e6;
    color: #d93025;
}

.auth-result.success .result-message {
    background: #e6f4ea;
    color: #137333;
}

.auth-success {
    text-align: center;
}

.success-icon {
    margin-bottom: 16px;
}

.success-icon i {
    font-size: 48px;
    color: #137333;
}

.auth-success h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 400;
    color: #202124;
}

.auth-success p {
    margin: 0 0 24px 0;
    color: #5f6368;
    font-size: 14px;
    line-height: 1.4;
}

.login-link-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-modal-footer {
    padding: 16px 24px 24px 24px;
    border-top: 1px solid #e8eaed;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.auth-note {
    margin: 0;
    font-size: 12px;
    color: #5f6368;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.auth-note i {
    font-size: 16px;
    color: #9aa0a6;
}

.auth-success .auth-note {
    background: #f1f3f4;
    padding: 12px;
    border-radius: 8px;
    justify-content: center;
}

.auth-success .auth-note p {
    margin: 0;
    font-size: 12px;
}

.email-display {
    font-weight: 500;
    color: #e7c54d;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    margin: 10px 0;
    font-family: monospace;
    font-size: 14px;
    border: 1px solid #e8eaed;
    text-align: center;
}

/* Responsive design */
@media (max-width: 480px) {
    .auth-modal-content {
        margin: 10px;
        border-radius: 8px;
    }
    
    .auth-modal-header,
    .auth-modal-body {
        padding: 20px;
    }
    
    .auth-modal-footer {
        padding: 16px 20px 20px 20px;
    }
    
    .login-link-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .auth-modal-content {
        background: #2d2e30;
        color: #e8eaed;
    }
    
    .auth-modal-header h2 {
        color: #e8eaed;
    }
    
    .form-group label {
        color: #e8eaed;
    }
    
    .form-input {
        background: #3c4043;
        border-color: #5f6368;
        color: #e8eaed;
    }
    
    .form-input::placeholder {
        color: #9aa0a6;
    }
    
    .auth-modal-footer {
        background: #35363a;
        border-top-color: #5f6368;
    }
}
