/* ==========================================================================
   Mezatika Auth Page — Giriş / Kayıt
   Scope: .mzt-auth-standalone body (form-login.php override)
   ========================================================================== */

/* ── Reset / Base ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body.mzt-auth-standalone {
    margin: 0 !important;
    padding: 0 !important;
    background: #FFFFFF !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    color: #1A1A1A;
    -webkit-font-smoothing: antialiased;
}

/* Tema header/footer gizle */
body.mzt-auth-standalone .site-header,
body.mzt-auth-standalone .site-footer,
body.mzt-auth-standalone header:not(.mzt-auth-footer),
body.mzt-auth-standalone footer:not(.mzt-auth-footer),
body.mzt-auth-standalone #masthead,
body.mzt-auth-standalone .header-custom-wrapper,
body.mzt-auth-standalone .footer-custom-wrapper,
body.mzt-auth-standalone .top-bar-wrapper,
body.mzt-auth-standalone .bottom-nav-bar,
body.mzt-auth-standalone .woocommerce-breadcrumb,
body.mzt-auth-standalone nav.woocommerce-MyAccount-navigation,
body.mzt-auth-standalone .page-title-section {
    display: none !important;
}

/* WooCommerce / tema sarmalayıcı — içerik ortada, tam genişlik */
body.mzt-auth-standalone #mezatika-page,
body.mzt-auth-standalone .mezatika-page-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

body.mzt-auth-standalone .site-content,
body.mzt-auth-standalone #content,
body.mzt-auth-standalone .content-area,
body.mzt-auth-standalone .entry-content,
body.mzt-auth-standalone article.page {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    float: none !important;
}

body.mzt-auth-standalone .woocommerce-account .woocommerce {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

body.mzt-auth-standalone .woocommerce-MyAccount-content {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* Dokan kalıntısı (başka hook eklerse gizle) */
body.mzt-auth-standalone .vendor-customer-registration,
body.mzt-auth-standalone #mzt-register-form .show_if_seller {
    display: none !important;
}

/* ── Sayfa Düzeni ─────────────────────────────────────────────────────────── */

.mzt-auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    padding: 40px 20px 60px;
    background: #FFFFFF;
    box-sizing: border-box;
}

.mzt-auth-notices {
    width: 100%;
    max-width: 520px;
    margin-bottom: 16px;
}

/* ── Logo ─────────────────────────────────────────────────────────────────── */

.mzt-auth-logo {
    margin-bottom: 36px;
    width: 100%;
    text-align: center;
}
.mzt-auth-logo a {
    display: inline-block;
}
.mzt-auth-logo-img {
    height: 38px;
    width: auto;
    display: block;
}

/* ── Ana Kart ─────────────────────────────────────────────────────────────── */

.mzt-auth-card {
    width: 100%;
    max-width: 480px;
    background: #FFFFFF;
    border: 1px solid #E8E8E8;
    border-radius: 14px;
    padding: 32px 28px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

/* ── Tab'lar ──────────────────────────────────────────────────────────────── */

.mzt-auth-tabs {
    display: flex;
    border-bottom: 1px solid #E8E8E8;
    margin-bottom: 28px;
    gap: 0;
}
.mzt-auth-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 8px 12px;
    font-size: 16px;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 44px;
}
.mzt-auth-tab.active {
    color: #1A1A1A;
    border-bottom-color: #F5A623;
    font-weight: 600;
}
.mzt-auth-tab:focus {
    outline: none;
}
.mzt-auth-tab:focus-visible {
    outline: 2px solid #F5A623;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Panel Gizle/Göster ───────────────────────────────────────────────────── */

.mzt-auth-panel {
    display: none;
}
.mzt-auth-panel.active {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* ── Giriş Yöntemi Seçici ─────────────────────────────────────────────────── */

.mzt-login-method-toggle {
    display: flex;
    background: #F5F5F5;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
    gap: 0;
}
.mzt-method-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #777;
    cursor: pointer;
    border-radius: 7px;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    line-height: 1.25;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 38px;
}
.mzt-method-btn.active {
    background: #FFFFFF;
    color: #1A1A1A;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}
.mzt-method-btn:focus {
    outline: none;
}
.mzt-method-btn:focus-visible {
    outline: 2px solid #F5A623;
    outline-offset: 2px;
}

.mzt-login-method {
    display: none;
    width: 100%;
    box-sizing: border-box;
}
.mzt-login-method.active {
    display: block;
}

/* Giriş / kayıt formları kart genişliğini doldurur (#mzt-phone-login-form'da woocommerce-form yok) */
.mzt-auth-panel form {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    float: none !important;
}

/* ── Input Grupları ───────────────────────────────────────────────────────── */

.mzt-input-group {
    position: relative;
    margin-bottom: 14px;
}
.mzt-input {
    width: 100%;
    padding: 15px 16px;
    border: 1.5px solid #E0E0E0;
    border-radius: 10px;
    font-size: 15px;
    color: #1A1A1A;
    background: #FAFAFA;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    outline: none;
    appearance: none;
}
.mzt-input:focus {
    border-color: #F5A623;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.10);
}
.mzt-input::placeholder {
    color: #AEAEB2;
}

/* WooCommerce varsayılan form-row / float — kayıtta sağ boşluk yaratmasın */
.mzt-auth-card .woocommerce-form .form-row,
.mzt-auth-card .woocommerce-form p.form-row,
.mzt-auth-card .woocommerce-form-row {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    float: none !important;
    clear: both !important;
}
.mzt-auth-card .u-columns,
.mzt-auth-card .col2-set {
    width: 100% !important;
    margin: 0 !important;
}

/* Ad/Soyad yan yana */
.mzt-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.mzt-input-row .mzt-input-group {
    margin-bottom: 0;
}

/* ── Telefon Input (+90 + alan tek satır, tam genişlik) ───────────────────── */
/* Not: .mzt-phone-input-group ile .mzt-input-group aynı elemanda; iç içe .mzt-input-group yok.
   Bu yüzden flex:1 doğrudan input'a verilir. */

.mzt-phone-input-group.mzt-input-group {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    gap: 0;
}
.mzt-phone-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    min-width: 52px;
    align-self: stretch;
    background: #F0F0F0;
    border: 1.5px solid #E0E0E0;
    border-right: none;
    border-radius: 10px 0 0 10px;
    font-size: 15px;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
}
.mzt-phone-input-group > .mzt-phone-input,
.mzt-phone-input-group > input.mzt-input[type="tel"],
.mzt-phone-input-group > input[type="tel"] {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    max-width: none !important;
    border-radius: 0 10px 10px 0 !important;
    box-sizing: border-box;
}

/* ── Şifre Toggle ─────────────────────────────────────────────────────────── */

.mzt-input-group:has(.mzt-password-toggle) .mzt-input {
    padding-right: 44px;
}
.mzt-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #AEAEB2;
}
.mzt-password-toggle:hover .mzt-eye-icon {
    stroke: #666;
}

/* ── Şifremi Unuttum ──────────────────────────────────────────────────────── */

.mzt-forgot-link {
    text-align: right;
    margin-bottom: 20px;
    margin-top: -6px;
}
.mzt-forgot-link a {
    font-size: 13px;
    color: #F5A623;
    text-decoration: none;
    font-weight: 500;
}
.mzt-forgot-link a:hover {
    text-decoration: underline;
    color: #E09515;
}

.mzt-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    user-select: none;
}
.mzt-remember input {
    width: 16px;
    height: 16px;
    accent-color: #F5A623;
}

/* ── Submit Butonu ────────────────────────────────────────────────────────── */

/* iOS/WKWebView: düz metinli <button> içinde yazı aşağı kayar; dikey padding 0 + span ile ortala */
.mzt-auth-submit {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    max-width: none;
    min-height: 52px;
    padding: 0 20px !important;
    background: #F5A623;
    color: #1A1A1A;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    line-height: 0 !important;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    margin: 12px 0 0;
    letter-spacing: 0.01em;
    box-sizing: border-box;
    -webkit-appearance: none !important;
    appearance: none !important;
    text-align: center;
    vertical-align: middle;
}
.mzt-auth-submit-text {
    display: block;
    line-height: 1.3;
    padding: 0;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    pointer-events: none;
}
/* Capacitor / Safari: font metriklerine göre ince dikey düzeltme */
@supports (-webkit-touch-callout: none) {
    .mzt-auth-submit-text {
        transform: translateY(-1px);
    }
}
.mzt-auth-card .mzt-auth-submit {
    width: 100% !important;
    max-width: 100% !important;
}
.mzt-auth-submit:hover {
    background: #E09515;
}
.mzt-auth-submit:focus {
    outline: none;
}
.mzt-auth-submit:focus-visible {
    outline: 2px solid #1A1A1A;
    outline-offset: 2px;
}
.mzt-auth-submit:active {
    transform: scale(0.99);
}
.mzt-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ── OTP Bölümü ───────────────────────────────────────────────────────────── */

.mzt-otp-section {
    margin-bottom: 4px;
}
.mzt-otp-info {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px;
    text-align: center;
    line-height: 1.5;
}
.mzt-otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}
.mzt-otp-digit {
    width: 46px;
    height: 52px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    border: 1.5px solid #E0E0E0;
    border-radius: 10px;
    background: #FAFAFA;
    outline: none;
    transition: border-color 0.15s;
    -moz-appearance: textfield;
}
.mzt-otp-digit::-webkit-inner-spin-button,
.mzt-otp-digit::-webkit-outer-spin-button { -webkit-appearance: none; }
.mzt-otp-digit:focus {
    border-color: #F5A623;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.10);
}
.mzt-otp-digit.filled {
    border-color: #F5A623;
    color: #F5A623;
}
.mzt-otp-resend {
    text-align: center;
    margin-bottom: 18px;
}
.mzt-otp-resend span,
.mzt-otp-resend a {
    font-size: 13px;
    color: #AEAEB2;
}
.mzt-otp-resend a {
    color: #F5A623;
    cursor: pointer;
    text-decoration: underline;
}

/* ── Kayıt bölümleri ───────────────────────────────────────────────────────── */

.mzt-register-section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 0 18px;
    padding: 0 0 18px;
    border-bottom: 1px solid #F0F0F0;
}

/* Son alan ile alt çizgi arasında çifte boşluk olmasın */
.mzt-register-section > .mzt-input-group:last-child,
.mzt-register-section > .mzt-input-row:last-child {
    margin-bottom: 0;
}

.mzt-register-section--password {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 12px;
}

#mzt-register-panel {
    width: 100%;
    box-sizing: border-box;
}

.mzt-register-section-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: #1A1A1A;
    letter-spacing: 0.01em;
}

.mzt-register-section-hint {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.45;
    color: #8E8E93;
}

.mzt-seller-fields {
    margin-top: 16px;
    padding: 16px;
    background: #FAFAFA;
    border: 1px solid #ECECEC;
    border-radius: 12px;
}

.mzt-seller-fields[hidden] {
    display: none !important;
}

.mzt-seller-fields-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
}

.mzt-shopurl-hint {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #8E8E93;
    word-break: break-all;
    line-height: 1.4;
}

.mzt-shopurl-preview {
    color: #1A1A1A;
    font-weight: 600;
}

/* ── Rol Seçimi ───────────────────────────────────────────────────────────── */

.mzt-role-toggle {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 100%;
    gap: 10px;
    margin: 0;
    box-sizing: border-box;
}
.mzt-role-option {
    flex: 1;
    cursor: pointer;
}
.mzt-role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.mzt-role-label {
    display: block;
    text-align: center;
    padding: 12px 8px;
    border: 1.5px solid #E0E0E0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #777;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    cursor: pointer;
}
.mzt-role-option input[type="radio"]:checked + .mzt-role-label {
    border-color: #F5A623;
    background: #FFF8ED;
    color: #1A1A1A;
    font-weight: 600;
}

/* ── Satıcı Ek Alanları ───────────────────────────────────────────────────── */

.mzt-seller-fields {
    background: #FAFAFA;
    border: 1px dashed #E0E0E0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}
.mzt-seller-fields .mzt-input-group:last-child {
    margin-bottom: 0;
}

/* ── Kullanım Koşulları ───────────────────────────────────────────────────── */

/* Eklenti/Woo kalıntısı (çift KVKK metni kaldırılsa da tema CSS’i sıfırlasın) */
#mzt-register-form .woocommerce-privacy-policy-text {
    margin: 0 0 12px !important;
    padding: 0 !important;
    font-size: 12px;
    line-height: 1.55;
    color: #AEAEB2;
}
#mzt-register-form .woocommerce-privacy-policy-text p {
    margin: 0 0 8px !important;
}
#mzt-register-form .woocommerce-privacy-policy-text p:last-child {
    margin-bottom: 0 !important;
}

.mzt-terms-text {
    margin-top: 0;
    margin-bottom: 14px;
}
.mzt-terms-text p,
.mzt-terms-text {
    font-size: 12px;
    color: #AEAEB2;
    line-height: 1.6;
    margin: 0;
}
.mzt-terms-text a {
    color: #1A1A1A;
    font-weight: 600;
    text-decoration: underline;
}
.mzt-terms-text a:hover {
    color: #F5A623;
}

/* ── Sosyal Giriş Bölümü ──────────────────────────────────────────────────── */

.mzt-social-section {
    width: 100%;
    max-width: 480px;
    margin-top: 20px;
}

/* Nextend Social Login buton stilini override et */
.mzt-social-section .nextend-social-login,
.mzt-social-section .nsl-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
}
.mzt-social-section .nsl-container-block .nsl-button {
    max-width: 480px !important;
    width: 100% !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border: 1.5px solid #E0E0E0 !important;
    box-shadow: none !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}
.mzt-social-section .nsl-container-block .nsl-button:hover {
    border-color: #CCC !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}
.mzt-social-section .nsl-container-block .nsl-button-google { background: #FFFFFF !important; color: #444 !important; }
.mzt-social-section .nsl-container-block .nsl-button-facebook { background: #1877F2 !important; border-color: #1877F2 !important; }
.mzt-social-section .nsl-container-block .nsl-button-apple { background: #000000 !important; border-color: #000 !important; }

/* "veya" ayırıcı */
.mzt-social-section .nsl-container::before {
    content: 'veya';
    font-size: 13px;
    color: #AEAEB2;
    text-align: center;
    display: block;
    position: relative;
    margin-bottom: 4px;
}

/* ── Alt Bilgi ─────────────────────────────────────────────────────────────── */

.mzt-auth-footer {
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
}
.mzt-auth-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 8px;
}
.mzt-auth-secure span {
    font-size: 12px;
    color: #34C759;
    font-weight: 500;
}
.mzt-auth-copyright {
    font-size: 11px;
    color: #AEAEB2;
    margin: 0;
}

/* ── WooCommerce Mesajları ─────────────────────────────────────────────────── */

body.mzt-auth-standalone .woocommerce-error,
body.mzt-auth-standalone .woocommerce-message,
body.mzt-auth-standalone .woocommerce-info {
    width: 100%;
    max-width: 480px;
    border-radius: 10px !important;
    margin: 0 0 16px !important;
    font-size: 14px !important;
    padding: 12px 16px 12px 20px !important;
    list-style: none !important;
}
body.mzt-auth-standalone .woocommerce-error {
    border-left-color: #FF3B30 !important;
    background: #FFF5F5 !important;
    color: #C0392B !important;
}
body.mzt-auth-standalone .woocommerce-message {
    border-left-color: #34C759 !important;
    background: #F4FFF7 !important;
    color: #1E7E34 !important;
}
body.mzt-auth-standalone .woocommerce-info {
    border-left-color: #F5A623 !important;
    background: #FFF8ED !important;
    color: #8B6914 !important;
}
body.mzt-auth-standalone .woocommerce-error li { list-style: none !important; margin: 0 !important; }

/* ── Mobil ────────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    .mzt-auth-page {
        padding: 24px 16px 48px;
    }
    .mzt-auth-card {
        padding: 24px 20px;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }
    .mzt-auth-logo {
        margin-bottom: 28px;
    }
    .mzt-auth-logo-img {
        height: 32px;
    }
    .mzt-otp-digit {
        width: 42px;
        height: 48px;
        font-size: 20px;
    }
    .mzt-input-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .mzt-input-row .mzt-input-group {
        margin-bottom: 14px;
    }
}
