/* Authentication Pages Shared Styles */

/* Container Styles */
.login-container,
.register-container,
.forgot-container {
    padding: 2rem 0;
}

/* Card Styles */
.login-card,
.register-card,
.forgot-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--line2);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 80px rgba(0, 230, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.login-card {
    max-width: 420px;
}

/* Register card wider on desktop */
.register-card {
    max-width: 650px;
}

.login-card::before,
.register-card::before,
.forgot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    border-radius: 24px 24px 0 0;
}

/* Header Styles */
.login-header,
.register-header,
.forgot-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo,
.register-logo,
.forgot-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
    font-weight: 700;
    color: #001022;
    box-shadow: 0 10px 30px rgba(13, 88, 255, 0.3);
}

.login-title,
.register-title,
.forgot-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--fg);
    margin-bottom: 8px;
}

.login-subtitle,
.register-subtitle,
.forgot-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Form Styles */
.login-form,
.register-form,
.forgot-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-group.flex-row {
    flex-direction: row !important;
    align-items: center;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Billing/Shipping section header - tight spacing between heading and first field */
.billing-section-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}
.billing-section-header .form-group {
    margin-bottom: 0;
}

.form-label {
    font-weight: 600;
    color: var(--fg);
    font-size: 0.9rem;
    margin-left: 4px;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--line2);
    border-radius: 16px;
    height: 52px;
    padding: 0 20px;
    color: var(--fg);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--cta);
    box-shadow: 0 0 0 3px rgba(13, 88, 255, 0.1);
}

.form-input::placeholder {
    color: var(--muted);
}

.form-input.pr-12 {
    padding-right: 48px;
}

/* Button Styles */
.form-actions {
    margin-top: 8px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 52px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-cta {
    background: var(--gradient);
    color: #001022;
    box-shadow: 0 8px 25px rgba(13, 88, 255, 0.3);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(13, 88, 255, 0.4);
}

.btn-text {
    z-index: 1;
    position: relative;
}

.btn-icon {
    width: 20px;
    height: 20px;
    z-index: 1;
    position: relative;
}

/* Footer Styles */
.login-footer,
.register-footer,
.forgot-footer {
    text-align: center;
    margin-top: 24px;
}

/* Form Links Styles */
.form-links {
    text-align: center;
    margin-top: 24px;
}

.forgot-password {
    display: block;
    color: var(--cta);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 16px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--cta-hover);
}

.register-link {
    color: var(--muted);
    font-size: 0.9rem;
}

.register-link a {
    color: var(--cta);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.register-link a:hover {
    color: var(--cta-hover);
}

/* Message Styles */
.error-message, 
.success-message {
    margin-bottom: 20px;
}

/* Password Toggle Button - aligned inside input */
.form-group .relative {
    display: block;
}
.form-group .relative .form-input {
    display: block;
    box-sizing: border-box;
}
.form-group .relative .toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.form-group .relative .toggle-password:hover {
    color: var(--fg);
}

.form-group .relative .toggle-password svg,
.form-group .relative .toggle-password .w-5 {
    width: 20px;
    height: 20px;
}

/* Password Strength Indicator */
.password-strength {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}

/* Failed requirement - highlight what's wrong */
.requirement-item.text-red-400 {
    background: rgba(239, 68, 68, 0.08);
    border-radius: 6px;
    padding: 4px 8px;
    margin: 2px 0;
    border-left: 3px solid rgba(239, 68, 68, 0.5);
}

.password-strength.weak {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.password-strength.medium {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.password-strength.strong {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Checkbox Styles */
.form-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    color: var(--cta);
    background: var(--glass);
    border: 1px solid var(--line2);
    border-radius: 0.25rem;
    cursor: pointer;
}

.form-group input[type="checkbox"]:focus {
    outline: none;
    ring: 2px;
    ring-color: var(--cta);
}

/* Responsive Design */
@media (max-width: 768px) {
    .register-card {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .login-card,
    .register-card,
    .forgot-card {
        padding: 32px 24px;
        margin: 0 16px;
        max-width: 100%;
    }
    
    .login-title,
    .register-title,
    .forgot-title {
        font-size: 1.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}
