/**
 * SwissProfs - Auth CSS
 * Styles for login, registration, and password reset pages
 *
 * @package SwissProfs
 */

/* ==========================================================================
   AUTH LAYOUT
   ========================================================================== */

.sp-auth-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #F9FAFB 0%, #EFF6FF 100%);
}

.sp-auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ==========================================================================
   AUTH SIDEBAR (Desktop Only)
   ========================================================================== */

.sp-auth-sidebar {
    display: none;
    width: 45%;
    background: linear-gradient(135deg, #E63946 0%, #F97316 100%);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .sp-auth-sidebar {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

.sp-auth-sidebar::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.sp-auth-sidebar-content {
    position: relative;
    z-index: 1;
    color: #fff;
}

.sp-auth-sidebar-logo {
    margin-bottom: 3rem;
}

.sp-auth-sidebar-logo img {
    height: 2.5rem;
}

.sp-auth-sidebar h2 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.sp-auth-sidebar p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.sp-auth-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-auth-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    font-size: 1rem;
    opacity: 0.95;
}

.sp-auth-features .dashicons {
    font-size: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem;
    border-radius: 50%;
}

/* ==========================================================================
   AUTH MAIN CONTENT
   ========================================================================== */

.sp-auth-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}

@media (min-width: 640px) {
    .sp-auth-main {
        padding: 3rem;
    }
}

.sp-auth-card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.sp-auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.sp-auth-logo {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.sp-auth-logo img {
    height: 2.5rem;
}

@media (min-width: 1024px) {
    .sp-auth-logo {
        display: none;
    }
}

.sp-auth-header h1 {
    font-size: 1.75rem;
    color: #111827;
    margin: 0 0 0.5rem;
}

.sp-auth-header p {
    color: #6B7280;
    margin: 0;
}

/* ==========================================================================
   AUTH FORM
   ========================================================================== */

.sp-auth-form {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.sp-auth-form .sp-form-group {
    margin-bottom: 1.25rem;
}

.sp-auth-form .sp-form-label {
    font-size: 0.875rem;
}

.sp-auth-form .sp-form-control {
    padding: 0.875rem 1rem;
}

/* Password Toggle */
.sp-password-toggle {
    position: relative;
}

.sp-password-toggle .sp-toggle-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    padding: 0.25rem;
}

.sp-password-toggle .sp-toggle-btn:hover {
    color: #6B7280;
}

/* Remember Me & Forgot Password */
.sp-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.sp-remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4B5563;
}

.sp-remember-me input {
    width: 1rem;
    height: 1rem;
    accent-color: #E63946;
}

.sp-forgot-link {
    font-size: 0.875rem;
    color: #E63946;
    text-decoration: none;
}

.sp-forgot-link:hover {
    text-decoration: underline;
}

/* Submit Button */
.sp-auth-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

/* Divider */
.sp-auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #9CA3AF;
    font-size: 0.875rem;
}

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

/* Social Login */
.sp-social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sp-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: #fff;
    border: 2px solid #E5E7EB;
    border-radius: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sp-social-btn:hover {
    border-color: #D1D5DB;
    background: #F9FAFB;
}

.sp-social-btn img {
    width: 1.25rem;
    height: 1.25rem;
}

/* ==========================================================================
   AUTH FOOTER
   ========================================================================== */

.sp-auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: #6B7280;
}

.sp-auth-footer a {
    color: #E63946;
    font-weight: 600;
    text-decoration: none;
}

.sp-auth-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   ROLE SELECTION
   ========================================================================== */

.sp-role-selection {
    margin-bottom: 1.5rem;
}

.sp-role-selection .sp-form-label {
    margin-bottom: 1rem;
}

.sp-role-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.sp-role-card {
    position: relative;
    cursor: pointer;
}

.sp-role-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sp-role-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: #F9FAFB;
    border: 2px solid #E5E7EB;
    border-radius: 0.75rem;
    text-align: center;
    transition: all 0.15s ease;
}

.sp-role-card:hover .sp-role-card-content {
    border-color: #E63946;
}

.sp-role-card input:checked + .sp-role-card-content {
    background: #FEF2F2;
    border-color: #E63946;
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.1);
}

.sp-role-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    margin-bottom: 0.75rem;
    color: #6B7280;
}

.sp-role-icon .dashicons {
    font-size: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
}

.sp-role-card input:checked + .sp-role-card-content .sp-role-icon {
    background: #E63946;
    color: #fff;
}

.sp-role-title {
    font-weight: 600;
    color: #111827;
    font-size: 0.9375rem;
}

.sp-role-desc {
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 0.25rem;
}

/* ==========================================================================
   PASSWORD STRENGTH
   ========================================================================== */

.sp-password-strength {
    margin-top: 0.75rem;
}

.sp-strength-bar {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.sp-strength-segment {
    flex: 1;
    height: 4px;
    background: #E5E7EB;
    border-radius: 2px;
    transition: background 0.15s ease;
}

.sp-strength-weak .sp-strength-segment:nth-child(1) {
    background: #DC2626;
}

.sp-strength-fair .sp-strength-segment:nth-child(1),
.sp-strength-fair .sp-strength-segment:nth-child(2) {
    background: #F59E0B;
}

.sp-strength-good .sp-strength-segment:nth-child(1),
.sp-strength-good .sp-strength-segment:nth-child(2),
.sp-strength-good .sp-strength-segment:nth-child(3) {
    background: #10B981;
}

.sp-strength-strong .sp-strength-segment {
    background: #059669;
}

.sp-strength-text {
    font-size: 0.75rem;
    color: #6B7280;
}

.sp-strength-weak .sp-strength-text { color: #DC2626; }
.sp-strength-fair .sp-strength-text { color: #F59E0B; }
.sp-strength-good .sp-strength-text { color: #10B981; }
.sp-strength-strong .sp-strength-text { color: #059669; }

/* ==========================================================================
   VERIFICATION STEPS
   ========================================================================== */

.sp-verification-steps {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.sp-verification-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sp-verification-step:not(:last-child)::after {
    content: '';
    width: 2rem;
    height: 2px;
    background: #E5E7EB;
    margin-left: 0.5rem;
}

.sp-step-circle {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E5E7EB;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6B7280;
}

.sp-verification-step.active .sp-step-circle {
    background: #E63946;
    color: #fff;
}

.sp-verification-step.completed .sp-step-circle {
    background: #10B981;
    color: #fff;
}

.sp-step-text {
    font-size: 0.8125rem;
    color: #6B7280;
}

.sp-verification-step.active .sp-step-text {
    color: #111827;
    font-weight: 500;
}

/* ==========================================================================
   OTP INPUT
   ========================================================================== */

.sp-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 2rem 0;
}

.sp-otp-input {
    width: 3.5rem;
    height: 4rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #E5E7EB;
    border-radius: 0.75rem;
    transition: all 0.15s ease;
}

.sp-otp-input:focus {
    outline: none;
    border-color: #E63946;
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.1);
}

.sp-otp-input.filled {
    border-color: #10B981;
    background: #F0FDF4;
}

.sp-resend-code {
    text-align: center;
    font-size: 0.875rem;
    color: #6B7280;
}

.sp-resend-code button {
    background: none;
    border: none;
    color: #E63946;
    font-weight: 600;
    cursor: pointer;
}

.sp-resend-code button:disabled {
    color: #9CA3AF;
    cursor: not-allowed;
}

/* ==========================================================================
   PASSWORD RESET
   ========================================================================== */

.sp-reset-icon {
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    background: #FEF2F2;
    border-radius: 50%;
    color: #E63946;
}

.sp-reset-icon .dashicons {
    font-size: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
}

.sp-reset-success {
    text-align: center;
}

.sp-reset-success-icon {
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    background: #D1FAE5;
    border-radius: 50%;
    color: #059669;
}

.sp-reset-success-icon .dashicons {
    font-size: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
}

/* ==========================================================================
   ERROR MESSAGES
   ========================================================================== */

.sp-auth-error {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    color: #991B1B;
    font-size: 0.875rem;
}

.sp-auth-error .dashicons {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.sp-auth-success {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    color: #166534;
    font-size: 0.875rem;
}

/* ==========================================================================
   TERMS & CONDITIONS
   ========================================================================== */

.sp-terms-checkbox {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.sp-terms-checkbox label {
    font-size: 0.875rem;
    color: #4B5563;
    line-height: 1.5;
}

.sp-terms-checkbox a {
    color: #E63946;
    text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 480px) {
    .sp-auth-main {
        padding: 1rem;
    }
    
    .sp-auth-form {
        padding: 1.5rem;
    }
    
    .sp-auth-header h1 {
        font-size: 1.5rem;
    }
    
    .sp-role-cards {
        grid-template-columns: 1fr;
    }
    
    .sp-otp-input {
        width: 2.75rem;
        height: 3.5rem;
        font-size: 1.25rem;
    }
}
