/*
 * ct-auth.css
 * Styles for the custom CoffeeTrail registration page (page-ct-register.php).
 * Standalone — no header/footer from the theme.
 */

/* ─────────────────────────────────────────────────────────────────────────
   Reset / Page shell
   ───────────────────────────────────────────────────────────────────────── */

.ct-auth-body {
    margin: 0;
    padding: 0;
    background: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    direction: rtl;
}

.ct-auth-page {
    display: flex;
    min-height: 100vh;
    direction: rtl;
}

/* ─────────────────────────────────────────────────────────────────────────
   Left panel — green branding
   ───────────────────────────────────────────────────────────────────────── */

.ct-auth-page__brand {
    flex: 0 0 53%;
    background: linear-gradient(106deg, #00a63e 14.15%, #008236 85.85%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px;
    text-align: center;
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
}

.ct-auth-brand-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 424px;
}

.ct-auth-brand-icon {
    opacity: 0.9;
}

.ct-auth-brand-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.37px;
    color: #fff;
    margin: 0;
}

.ct-auth-brand-sub {
    font-size: 18px;
    font-weight: 400;
    color: #dcfce7;
    margin: 0;
    line-height: 1.55;
    letter-spacing: -0.44px;
}

/* ─────────────────────────────────────────────────────────────────────────
   Right panel — form
   ───────────────────────────────────────────────────────────────────────── */

.ct-auth-page__panel {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 78px 64px 64px;
    position: relative;
    background: #fff;
}

/* CoffeeTrail logo badge — black rounded square */
.ct-auth-logo-badge {
    position: absolute;
    top: 78px;
    left: 64px;          /* RTL: left DOM = visually right on screen */
    width: 48px;
    height: 48px;
    background: #000;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   Variant containers
   ───────────────────────────────────────────────────────────────────────── */

.ct-auth-variant {
    display: none;
    flex-direction: column;
    gap: 0;
    max-width: 423px;
    margin-top: 112px; /* clears the badge */
}

.ct-auth-variant--active {
    display: flex;
}

/* ─────────────────────────────────────────────────────────────────────────
   Typography
   ───────────────────────────────────────────────────────────────────────── */

.ct-auth-title {
    font-size: 24px;
    font-weight: 600;
    color: #101828;
    margin: 0 0 8px;
    line-height: 1.33;
    letter-spacing: -0.53px;
    text-align: right;
}

.ct-auth-title--sm {
    font-size: 22px;
}

.ct-auth-subtitle {
    font-size: 14px;
    color: #6a7282;
    margin: 0 0 24px;
    text-align: right;
    letter-spacing: -0.15px;
}

/* ─────────────────────────────────────────────────────────────────────────
   Google button
   ───────────────────────────────────────────────────────────────────────── */

.ct-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    background: #fff;
    border: 1px solid #d1d5dc;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 400;
    color: #101828;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    margin-bottom: 8px;
}

.ct-google-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #101828;
    text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────────────────
   Theme Google Sign-In button container (.cts-google-signin)
   ───────────────────────────────────────────────────────────────────────── */

.cts-google-signin {
    width: 100%;
    margin-bottom: 8px;
}

/* Force the rendered iframe/button to fill the container width */
.cts-google-signin > div,
.cts-google-signin iframe {
    width: 100% !important;
    max-width: 100% !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   Divider
   ───────────────────────────────────────────────────────────────────────── */

.ct-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #99a1af;
    font-size: 14px;
    margin: 16px 0;
}

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

/* ─────────────────────────────────────────────────────────────────────────
   Form field groups
   ───────────────────────────────────────────────────────────────────────── */

.ct-auth-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.ct-auth-form .ct-field-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    position: relative;
}

.ct-auth-form .ct-field-group--password {
    position: relative;
}

.ct-auth-form .ct-field {
    width: 100%;
    height: 50px;
    border: 1px solid #d1d5dc;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 16px;
    font-family: inherit;
    color: #101828;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    direction: rtl;
}

.ct-auth-form .ct-field::placeholder {
    color: #9ca3af;
}

.ct-auth-form .ct-field:focus {
    border-color: #00a63e;
    box-shadow: 0 0 0 2px rgba(0, 166, 62, 0.2);
}

.ct-auth-form .ct-field--error {
    border-color: #f97316;
    background: #fef3f2;
}

.ct-auth-form .ct-field--error:focus {
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.ct-auth-form .ct-field--valid {
    border-color: #10b981;
}

.ct-field-error {
    display: block;
    font-size: 12px;
    color: #f97316;
    margin-top: 6px;
    text-align: right;
    line-height: 1.4;
}

.ct-field-hint {
    display: block;
    font-size: 12px;
    color: #6a7282;
    margin-top: 6px;
    text-align: right;
}

/* Password toggle button */
.ct-password-toggle {
    position: absolute;
    left: 14px;           /* RTL: left DOM = right side of input */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    line-height: 0;
    display: flex;
    align-items: center;
    color: #9ca3af;
}

.ct-password-toggle:focus-visible {
    outline: 2px solid #00a63e;
    border-radius: 4px;
}

/* ─────────────────────────────────────────────────────────────────────────
   Checkbox
   ───────────────────────────────────────────────────────────────────────── */

.ct-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    margin-bottom: 12px;
    text-align: right;
    direction: rtl;
}

.ct-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: #00a63e;
    cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────────────────
   Terms of Service text
   ───────────────────────────────────────────────────────────────────────── */

.ct-auth-tos {
    font-size: 12px;
    color: #6a7282;
    line-height: 1.625;
    text-align: right;
    margin: 0 0 20px;
}

.ct-auth-tos a {
    color: #00a63e;
    font-weight: 500;
    text-decoration: none;
}

.ct-auth-tos a:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────────────
   Submit button
   ───────────────────────────────────────────────────────────────────────── */

.ct-auth-btn {
    width: 100%;
    height: 56px;
    background: #00a63e;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    letter-spacing: -0.31px;
    cursor: pointer;
    transition: opacity 0.15s ease, background 0.15s ease;
    margin-top: 4px;
}

.ct-auth-btn:hover {
    background: #008236;
}

.ct-auth-btn:disabled,
.ct-auth-btn.ct-auth-btn--disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ─────────────────────────────────────────────────────────────────────────
   Footer links
   ───────────────────────────────────────────────────────────────────────── */

.ct-auth-login-prompt {
    font-size: 14px;
    color: #6a7282;
    text-align: right;
    margin: 16px 0 0;
    letter-spacing: -0.15px;
}

.ct-auth-login-link {
    color: #101828;
    font-weight: 500;
    text-decoration: none;
}

.ct-auth-login-link:hover {
    text-decoration: underline;
}

.ct-auth-switch {
    margin: 12px 0 0;
    text-align: right;
}

.ct-auth-switch-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: #00a63e;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
}

.ct-auth-switch-btn:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────────────────────────────────────
   Form-level notice
   ───────────────────────────────────────────────────────────────────────── */

.ct-auth-notice {
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: right;
}

.ct-auth-notice--error {
    background: #fef3f2;
    border: 1px solid #f97316;
    color: #b45309;
}

/* ─────────────────────────────────────────────────────────────────────────
   Responsive — mobile
   ───────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .ct-auth-page {
        flex-direction: column;
        min-height: 100vh;
    }

    .ct-auth-page__brand {
        flex: none;
        position: static;
        height: auto;
        padding: 40px 24px;
    }

    .ct-auth-brand-title { font-size: 26px; }
    .ct-auth-brand-sub   { font-size: 15px; }

    .ct-auth-page__panel {
        padding: 40px 24px 48px;
    }

    .ct-auth-logo-badge {
        top: 20px;
        left: 24px;
    }

    .ct-auth-variant {
        margin-top: 56px;
        max-width: 100%;
    }
}

/* OTP verification */
.ct-otp-resend-form {
    margin-top: 16px;
    text-align: center;
}

.ct-otp-resend-form .ct-auth-switch-btn:disabled {
    color: #98a2b3;
    cursor: not-allowed;
    text-decoration: none;
}

.ct-auth-notice--success {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}
