/* ==========================================
   Do it! khmer365 - Login Page Styles
   Full mobile-responsive social login
   ========================================== */

/* --- Login Section --- */
.login-section {
    padding: 90px 0 40px;
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
}

.login-container {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 0;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    min-height: 600px;
}

/* --- Left Branding --- */
.login-branding {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: white;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -20%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232,168,56,0.15) 0%, transparent 70%);
}

.login-branding::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -15%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
}

.branding-content {
    position: relative;
    z-index: 1;
}

.branding-logo {
    margin-bottom: 2rem;
}

.branding-logo .logo-do {
    font-size: 1.3rem;
}

.branding-logo .logo-khmer {
    font-size: 1.5rem;
}

.login-branding h2 {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.login-branding > .branding-content > p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.branding-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
}

.branding-feature i {
    color: var(--secondary-light);
    font-size: 1rem;
}

/* --- Right Form Area --- */
.login-form-area {
    padding: 2.5rem 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
}

/* --- Tabs --- */
.login-tabs {
    display: flex;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 2rem;
}

.login-tab {
    flex: 1;
    padding: 0.7rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 6px;
    transition: var(--transition);
    font-family: inherit;
}

.login-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.login-tab:hover:not(.active) {
    color: var(--text-medium);
}

/* --- Form Content --- */
.login-form-content h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.emoji-wave {
    display: inline-block;
}

.form-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* --- Social Buttons --- */
.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1.5rem;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: white;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.social-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.social-btn i {
    font-size: 1.1rem;
}

/* Google */
.google-btn:hover {
    border-color: #4285F4;
    background: #F8FBFF;
}

/* Facebook */
.facebook-btn {
    border-color: #e8ecf4;
}
.facebook-btn i {
    color: #1877F2;
}
.facebook-btn:hover {
    border-color: #1877F2;
    background: #F0F6FF;
}

/* Telegram */
.telegram-btn i {
    color: #0088CC;
}
.telegram-btn:hover {
    border-color: #0088CC;
    background: #E8F5FD;
}

/* --- Divider --- */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.divider span {
    padding: 0 1rem;
    font-size: 0.82rem;
    color: var(--text-light);
    white-space: nowrap;
}

/* --- Phone Login --- */
.phone-login-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.phone-input-group {
    display: flex;
    gap: 0;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.phone-input-group:focus-within {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(42,107,199,0.1);
}

.country-code {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.75rem;
    background: var(--bg-light);
    border-right: 1px solid var(--border-light);
    flex-shrink: 0;
}

.country-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.country-code select {
    border: none;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.4rem 0;
    cursor: pointer;
    font-family: inherit;
    outline: none;
}

.phone-input-group input {
    flex: 1;
    border: none;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-dark);
    outline: none;
    background: white;
}

.phone-input-group input::placeholder {
    color: var(--text-light);
}

.btn-phone-login {
    padding: 0.85rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    transition: var(--transition);
}

.btn-phone-login:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}

/* --- Form Row --- */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-group-half {
    display: flex;
    flex-direction: column;
}

.form-group-half label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.form-group-half input {
    padding: 0.7rem 0.85rem;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-dark);
    transition: var(--transition);
    background: var(--bg-light);
}

.form-group-half input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(42,107,199,0.1);
}

/* --- Terms Agreement --- */
.agree-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-medium);
}

.agree-check input { display: none; }

.check-custom-sm {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.agree-check input:checked ~ .check-custom-sm {
    background: var(--primary);
    border-color: var(--primary);
}

.agree-check input:checked ~ .check-custom-sm::after {
    content: '\2713';
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
}

.agree-text a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: underline;
}

/* --- OTP Section --- */
.otp-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.otp-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-medium);
    margin-bottom: 1.2rem;
    padding: 0.75rem 1rem;
    background: var(--bg-blue);
    border-radius: var(--radius-sm);
}

.otp-info i {
    color: var(--primary);
    font-size: 1.1rem;
}

.otp-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.otp-input {
    width: 48px;
    height: 56px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    font-family: 'Poppins', monospace;
    transition: var(--transition);
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42,107,199,0.15);
    background: var(--bg-blue);
}

.otp-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-verify-otp {
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--secondary) 0%, #D4922A 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    transition: var(--transition);
}

.btn-verify-otp:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(232,168,56,0.3);
}

.btn-resend-otp {
    padding: 0.6rem;
    background: none;
    border: none;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
    font-family: inherit;
    text-align: center;
}

.btn-resend-otp:hover {
    color: var(--primary);
}

.otp-timer {
    font-weight: 700;
    color: var(--primary);
}

/* --- Login Footer --- */
.login-footer-text {
    margin-top: auto;
    padding-top: 1.5rem;
    text-align: center;
}

.login-footer-text p {
    font-size: 0.82rem;
    color: var(--text-light);
}

.login-footer-text a {
    color: var(--primary);
    font-weight: 500;
}

/* --- Compact Footer --- */
.compact-footer {
    padding: 20px 0 !important;
}

.compact-footer .footer-bottom a {
    color: rgba(255,255,255,0.6);
}

.compact-footer .footer-bottom a:hover {
    color: var(--secondary);
}

/* ==========================================
   RESPONSIVE - Login
   ========================================== */
@media (max-width: 768px) {
    .login-section {
        padding: 80px 0 20px;
        align-items: flex-start;
    }
    
    .login-container {
        grid-template-columns: 1fr;
        margin: 0 0.75rem;
        min-height: auto;
        border-radius: var(--radius-md);
    }
    
    .login-branding {
        padding: 2rem 1.5rem;
    }
    
    .login-branding h2 {
        font-size: 1.4rem;
    }
    
    .branding-features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .branding-feature {
        font-size: 0.82rem;
    }
    
    .login-form-area {
        padding: 1.5rem;
    }
    
    .login-form-content h3 {
        font-size: 1.2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .otp-input {
        width: 42px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .otp-inputs {
        gap: 0.35rem;
    }
}

@media (max-width: 480px) {
    .login-section {
        padding: 75px 0 10px;
    }
    
    .login-container {
        margin: 0 0.5rem;
    }
    
    .login-branding {
        padding: 1.5rem 1.2rem;
    }
    
    .branding-features {
        grid-template-columns: 1fr;
    }
    
    .login-form-area {
        padding: 1.2rem;
    }
    
    .login-tabs {
        margin-bottom: 1.2rem;
    }
    
    .login-tab {
        font-size: 0.82rem;
        padding: 0.6rem 0.5rem;
    }
    
    .social-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .otp-input {
        width: 36px;
        height: 42px;
        font-size: 1rem;
    }
    
    .country-code select {
        font-size: 0.82rem;
    }
}
