/**
 * Authentication Styles - Template Marketplace
 * Styling for login, register, and auth pages
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 450px;
}

.auth-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

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

.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.auth-header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.auth-header h2 {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
}

.auth-form {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.8rem;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

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

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-success a {
    color: #155724;
    font-weight: 600;
    text-decoration: underline;
}

.auth-links {
    padding: 0 30px 20px;
    text-align: center;
}

.auth-links a {
    display: block;
    color: #667eea;
    text-decoration: none;
    margin-bottom: 10px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.demo-accounts {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #e1e5e9;
}

.demo-accounts h3 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 10px;
}

.demo-accounts p {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.pricing-info {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #e1e5e9;
}

.pricing-info h3 {
    color: #333;
    font-size: 1rem;
    margin-bottom: 15px;
}

.pricing-info ul {
    list-style: none;
    margin-bottom: 15px;
}

.pricing-info li {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.pricing-info li:before {
    content: "•";
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.pricing-info p {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }

    .auth-header {
        padding: 20px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .auth-header h2 {
        font-size: 1rem;
    }

    .auth-form {
        padding: 20px;
    }

    .demo-accounts,
    .pricing-info {
        padding: 15px 20px;
    }
}

/* Loading Animation */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    animation: spin 1s ease infinite;
}

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

/* Form Validation Styles */
.form-group input:invalid {
    border-color: #dc3545;
}

.form-group input:valid {
    border-color: #28a745;
}

.form-group input:invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-group input:valid:focus {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Custom Select Styling */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

input, select, button {
    transition: all 0.3s ease;
}

/* Legal Agreements Styles */
.legal-agreements {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.legal-agreements h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.legal-agreements h3::before {
    content: '⚖️';
    font-size: 1.2rem;
}

.legal-notice {
    color: #4b5563;
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.agreement-item {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.agreement-item:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #667eea;
}

.legal-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 700;
}

.legal-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.agreement-description {
    color: #6b7280;
    font-size: 0.8rem;
    margin: 0;
    padding-left: 1.75rem;
    line-height: 1.5;
}

.legal-warning {
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
    border: 2px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
    color: #92400e;
    font-size: 0.85rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.legal-warning i {
    color: #dc2626;
    margin-top: 0.1rem;
    font-size: 1rem;
}

.btn:disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.btn:disabled:hover {
    background: #9ca3af !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Mobile Responsive for Legal Agreements */
@media (max-width: 480px) {
    .legal-agreements {
        padding: 1rem;
        margin: 1rem 0;
    }

    .agreement-item {
        padding: 0.75rem;
    }

    .checkbox-label {
        font-size: 0.85rem;
    }

    .agreement-description {
        font-size: 0.75rem;
    }

    .legal-warning {
        font-size: 0.8rem;
        padding: 0.75rem;
    }
}
