/* Form Styles */

/* Auth Container */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--secondary-color) 100%);
    position: relative;
    overflow-y: auto;
}

.auth-card {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 3rem;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    margin: 2rem auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    height: 50px;
    margin: 0 auto 1rem;
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-header h2 i {
    color: var(--secondary-color);
}

.auth-header p {
    color: var(--text-light);
}

/* Form Elements */
.auth-form,
.contact-form,
.order-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group label i {
    color: var(--secondary-color);
    font-size: 1rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    color: var(--text-color);
    background: var(--bg-color);
    transition: var(--transition);
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(123, 63, 159, 0.1);
}

.form-group input.error,
.form-group textarea.error,
.form-group select.error {
    border-color: #EF4444;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-light);
    font-size: 0.875rem;
}

.input-error {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Textarea */
textarea {
    resize: vertical;
    min-height: 120px;
    font-family: var(--font-primary);
}

/* Form Row */
.form-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.form-check label {
    font-weight: normal;
    cursor: pointer;
    margin: 0;
}

.form-row a {
    color: var(--primary-color);
    font-weight: 600;
    white-space: nowrap;
}

.form-row a:hover {
    text-decoration: underline;
}

/* Button Styles */
.btn-block {
    width: 100%;
    display: block;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-social i {
    font-size: 1.25rem;
}

.btn-social:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-google {
    border-color: #4285F4;
    color: #4285F4;
}

.btn-google:hover {
    background: #4285F4;
    color: white;
}

.btn-facebook {
    border-color: #1877F2;
    color: #1877F2;
}

.btn-facebook:hover {
    background: #1877F2;
    color: white;
}

/* Auth Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    position: relative;
    background: var(--bg-color);
    padding: 0 1rem;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Auth Theme Toggle */
.auth-theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    z-index: 10;
}

.auth-theme-toggle .theme-toggle,
.auth-theme-toggle .language-switcher {
    background: rgba(255, 255, 255, 0.95);
    padding: 0.75rem 1rem;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.auth-theme-toggle .theme-toggle {
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
}

.auth-theme-toggle .language-switcher {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color);
}

/* Contact Form Container */
.contact-form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-form-container > div:first-child h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-form-container > div:first-child h2 i {
    color: var(--secondary-color);
}

/* Loading States */
.loading-spinner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner p {
    margin-top: 1rem;
    color: var(--text-light);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 9999;
    max-width: 350px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    font-size: 1.25rem;
}

.toast-success {
    border-left: 4px solid #10B981;
}

.toast-success i {
    color: #10B981;
}

.toast-error {
    border-left: 4px solid #EF4444;
}

.toast-error i {
    color: #EF4444;
}

.toast-info {
    border-left: 4px solid #3B82F6;
}

.toast-info i {
    color: #3B82F6;
}

.toast-warning {
    border-left: 4px solid #F59E0B;
}

.toast-warning i {
    color: #F59E0B;
}

/* ReCAPTCHA styling */
.g-recaptcha {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 992px) {
    .contact-form-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 1.5rem;
    }
    
    .auth-card {
        padding: 2rem;
        margin: 1rem auto;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.75rem 0.875rem;
        font-size: 0.95rem;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .form-row a {
        align-self: flex-start;
    }

    .contact-form-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .auth-theme-toggle {
        bottom: 1.5rem;
        right: 1.5rem;
        gap: 0.75rem;
    }
    
    .auth-theme-toggle .theme-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .toast {
        bottom: 1rem;
        right: 1rem;
        max-width: calc(100vw - 2rem);
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 1.5rem;
        margin: 0.5rem auto;
    }
    
    .auth-header h2 {
        font-size: 1.35rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .auth-header p {
        font-size: 0.9rem;
    }

    .form-group label {
        font-size: 0.875rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.7rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .btn,
    .btn-social {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .btn-social i {
        font-size: 1.1rem;
    }
    
    .auth-theme-toggle {
        bottom: 1rem;
        right: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .auth-theme-toggle .theme-toggle,
    .auth-theme-toggle .language-switcher {
        width: 45px;
        height: 45px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
    }
}

/* Dark Theme Specific */
[data-theme="dark"] .auth-container {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1E293B 50%, var(--secondary-color) 100%);
}

[data-theme="dark"] .auth-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .auth-theme-toggle .theme-toggle,
[data-theme="dark"] .auth-theme-toggle .language-switcher {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(55, 65, 81, 0.5);
}
