/* Authentication Pages Styles */

.auth-container {
    padding: 0;
    min-height: calc(100vh - 200px);
    background: linear-gradient(135deg, var(--primary-color-light), var(--primary-color));
    margin: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-layout {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
}

.auth-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideInUp 0.6s ease-out;
}

/* Auth Header */
.auth-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-dark));
    color: white;
    text-align: center;
    padding: 2.5rem 2rem;
}

.auth-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInDown 0.8s ease-out;
}

.auth-title {
    font-size: 2rem;
    margin: 0;
    font-weight: var(--font-weight-bold);
}

.auth-subtitle {
    font-size: 1rem;
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

/* Auth Form Container */
.auth-form-container {
    padding: 2rem;
}

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

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

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-label i {
    color: var(--primary-color);
    width: 16px;
}

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

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(237, 73, 51, 0.1);
}

.form-input::placeholder {
    color: #6c757d;
}

/* Password Requirements */
.password-requirements {
    margin-top: 0.5rem;
}

.password-requirements small {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Checkbox Styling */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.4;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    color: white;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
}

.checkbox-text {
    color: var(--text-color);
}

.checkbox-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* Form Options (Remember me + Forgot password) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

/* Auth Buttons */
.auth-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.auth-button.primary {
    background: var(--primary-color);
    color: white;
}

.auth-button.primary:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(237, 73, 51, 0.3);
}

.auth-button.secondary {
    background: #f8f9fa;
    color: var(--text-color);
    border: 2px solid #e1e5e9;
}

.auth-button.secondary:hover {
    background: #e9ecef;
    border-color: #d3d9df;
    transform: translateY(-1px);
}

/* Auth Divider */
.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    color: #6c757d;
    font-size: 0.9rem;
    position: relative;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

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

/* Auth Benefits */
.auth-benefits {
    padding: 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e1e5e9;
}

.auth-benefits h3 {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.benefit-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.benefit-item span {
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Auth-specific footer styling */
.auth-footer {
    width: 100% !important;
    background: var(--primary-color) !important;
    color: white !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
}

.auth-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.auth-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    font-size: 0.9rem;
}

.auth-footer-links span {
    color: white;
}

.auth-footer-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    padding: 0.5rem 1rem !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
}

.auth-footer-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

@media (max-width: 768px) {
    .auth-footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Ensure auth container doesn't interfere with footer */
.auth-page .auth-container {
    margin-bottom: 0 !important;
    min-height: calc(100vh - 200px) !important;
}

/* Fix any potential width constraints on auth pages */
.auth-page {
    overflow-x: hidden !important;
}

/* Override any main.css layout that might interfere */
.auth-page #page-wrapper {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem 0;
    }
    
    .auth-header {
        padding: 2rem 1.5rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .auth-form-container,
    .auth-benefits {
        padding: 1.5rem;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    /* Stack footer links vertically on mobile */
    .auth-page #footer .copyright li {
        display: block !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
        padding: 0.5rem 0 !important;
    }
    
    .auth-page #footer .copyright li:last-child {
        border-bottom: none !important;
    }
}

@media (max-width: 480px) {
    .auth-layout {
        padding: 0 0.5rem;
    }
    
    .auth-header {
        padding: 1.5rem 1rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-form-container,
    .auth-benefits {
        padding: 1rem;
    }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.auth-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.auth-button.loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

/* Checkbox label support for purchase.html */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 20px;
    width: 20px;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.checkbox-label .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-right: 8px;
    pointer-events: none;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #0066cc;
    background: var(--primary-color, #0066cc);
    border-color: #0066cc;
    border-color: var(--primary-color, #0066cc);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    display: block;
    color: white;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.checkbox-label:hover .checkmark {
    border-color: #0066cc;
    border-color: var(--primary-color, #0066cc);
}

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