/* =============================================================
   WC Cargo Tracker — Frontend CSS v1.2.0
   Responsive: Desktop → Tablet (820px) → Mobil (767px)
   ============================================================= */

/* ── Genel kart ── */
.wct-wrap {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wct-section-title {
    font-size: 18px; font-weight: 700; margin-bottom: 18px; color: #1f2937;
}

.wct-fe-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    overflow: visible;
}

/* ── Kargo başlığı ── */
.wct-fe-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.wct-fe-carrier {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    flex-shrink: 0;
}

.wct-fe-icon { font-size: 26px; }

.wct-fe-tn { text-align: right; min-width: 0; }
.wct-fe-tn small {
    display: block;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #9ca3af;
}
.wct-fe-tn strong {
    display: block;
    font-size: 18px;
    font-family: monospace;
    letter-spacing: 2px;
    color: #374151;
    word-break: break-all;
    margin: 2px 0;
}
.wct-fe-link {
    font-size: 12px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 4px;
}
.wct-fe-link:hover { text-decoration: underline; }

/* ── Proses adımları ── */
.wct-steps {
    display: flex !important;
    align-items: center !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding: 12px 2px 8px !important;
    margin-bottom: 20px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.wct-steps::-webkit-scrollbar { display: none; }

.wct-step {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    width: 80px !important;
}

.wct-step-dot {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: #e5e7eb !important;
    border: 2px solid #e5e7eb !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #9ca3af !important;
    transition: background .25s, box-shadow .25s, border-color .25s, color .25s !important;
    transform: none !important;
    position: relative !important;
    z-index: 2 !important;
    box-sizing: border-box !important;
}

.wct-step.done .wct-step-dot,
.wct-step.active .wct-step-dot {
    background: var(--wct-status-color, #3b82f6) !important;
    border-color: var(--wct-status-color, #3b82f6) !important;
    color: #fff !important;
}

.wct-step.active .wct-step-dot {
    box-shadow: 0 0 0 4px rgba(102,126,234,.2) !important;
}

.wct-step-lbl {
    font-size: 10px !important;
    text-align: center !important;
    margin-top: 7px !important;
    color: #9ca3af !important;
    line-height: 1.3 !important;
    max-width: 72px !important;
    white-space: normal !important;
}
.wct-step.done .wct-step-lbl,
.wct-step.active .wct-step-lbl {
    color: #374151 !important;
    font-weight: 700 !important;
}

.wct-step-line {
    flex: 1 !important;
    height: 3px !important;
    background: #e5e7eb !important;
    border-radius: 2px !important;
    min-width: 14px !important;
    margin-bottom: 26px !important;
    transition: background .25s !important;
    flex-shrink: 1 !important;
}
.wct-step-line.done {
    background: var(--wct-status-color, #3b82f6) !important;
}

/* ── Durum banner (iade/başarısız) ── */
.wct-status-banner {
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 20px;
}

/* ── Meta bilgiler ── */
.wct-fe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    background: #f9fafb;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.wct-meta-item small {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: #9ca3af;
}
.wct-meta-item strong {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

/* ── Zaman çizelgesi ── */
.wct-tl-wrap { margin-top: 20px; }
.wct-tl-heading {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
    margin-bottom: 14px;
}
.wct-tl {
    position: relative;
    padding-left: 16px;
}
.wct-tl::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0; bottom: 0;
    width: 2px;
    background: #e5e7eb;
}
.wct-tl-item {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    position: relative;
}
.wct-tl-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    z-index: 1;
    box-shadow: 0 0 0 3px #fff;
}
.wct-tl-body { padding-top: 4px; font-size: 13px; line-height: 1.5; min-width: 0; }
.wct-tl-body strong { display: block; font-size: 14px; color: #1f2937; }
.wct-tl-body em { font-size: 12px; color: #6b7280; display: block; margin-top: 2px; }
.wct-tl-body p { margin: 4px 0 0; color: #374151; }
.wct-tl-body small { display: block; margin-top: 4px; color: #9ca3af; font-size: 11px; }

/* ── Notlar ── */
.wct-fe-notes {
    background: #fefce8;
    border-left: 4px solid #fbbf24;
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    font-size: 13px;
    color: #374151;
    margin-top: 16px;
}

/* ── Kopyala butonu ── */
.wct-copy-hint {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px;
}
.wct-copy-btn {
    display: inline-block;
    margin-top: 6px;
    background: #fff7ed;
    color: #c2410c;
    border: 1.5px solid #fed7aa;
    border-radius: 6px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}
.wct-copy-btn:hover { background: #ffedd5; }
.wct-copy-btn.wct-copied { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }

/* ════════ PUBLIC TRACKER SHORTCODE ════════ */
.wct-public-tracker {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 0 16px;
    box-sizing: border-box;
}
.wct-pt-form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(102,126,234,.1);
    margin-bottom: 20px;
}
.wct-pt-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 20px;
    text-align: center;
    color: #1f2937;
}
.wct-pt-tabs { display: flex; border-bottom: 2px solid #f3f4f6; margin-bottom: 18px; }
.wct-pt-tab {
    background: none; border: none; cursor: pointer;
    padding: 9px 14px; font-size: 13px; font-weight: 600;
    color: #9ca3af; border-bottom: 3px solid transparent; margin-bottom: -2px;
    transition: color .2s, border-color .2s; flex: 1; text-align: center;
}
.wct-pt-tab.active { color: #667eea; border-bottom-color: #667eea; }
.wct-pt-input {
    width: 100%; padding: 13px 16px;
    border: 2px solid #e5e7eb; border-radius: 9px;
    font-size: 15px; box-sizing: border-box;
    margin-bottom: 12px; transition: border-color .2s; font-family: inherit;
}
.wct-pt-input:focus { outline: none; border-color: #667eea; }
.wct-pt-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border: none; border-radius: 9px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: opacity .2s; -webkit-appearance: none;
}
.wct-pt-btn:hover { opacity: .9; }
.wct-pt-btn:disabled { opacity: .65; cursor: not-allowed; }
.wct-pt-error {
    background: #fee2e2; color: #dc2626;
    border-radius: 8px; padding: 12px 16px;
    font-weight: 600; text-align: center; margin-bottom: 14px;
}
.wct-pt-result .wct-fe-card { box-shadow: 0 4px 20px rgba(102,126,234,.12); }

/* ════════ HESABIM KARGO TAKİP SAYFASI ════════ */
.wct-account-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.wct-account-empty {
    text-align: center; padding: 48px 24px;
    background: #f9fafb; border-radius: 12px;
    border: 2px dashed #e5e7eb;
}
.wct-empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.wct-account-empty p { color: #6b7280; font-size: 15px; margin-bottom: 16px; }
.wct-btn-orders {
    display: inline-block; background: #667eea; color: #fff;
    padding: 10px 24px; border-radius: 8px; text-decoration: none;
    font-weight: 700; font-size: 14px;
}
.wct-order-ref {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 14px; padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6; flex-wrap: wrap;
}
.wct-order-ref a {
    font-weight: 700; color: #667eea;
    text-decoration: none; font-size: 14px;
}
.wct-order-ref a:hover { text-decoration: underline; }
.wct-order-date { font-size: 12px; color: #9ca3af; }

/* ── Tema override: overflow hidden olan sarmalayıcılar ── */
.wct-account-page .wct-fe-card,
.wct-account-page .wct-steps,
.woocommerce-account .wct-fe-card,
.woocommerce-account .wct-steps {
    overflow: visible !important;
}
.woocommerce-account .sm-content-box,
.woocommerce-account .sm-content-body {
    overflow: visible !important;
}

/* ════════════════════════════════════════════
   RESPONSIVE — TABLET (max-width: 820px)
   ════════════════════════════════════════════ */
@media (max-width: 820px) {

    .wct-fe-card {
        padding: 18px;
    }

    .wct-fe-head {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }

    .wct-fe-carrier {
        font-size: 15px;
    }

    .wct-fe-icon { font-size: 22px; }

    .wct-fe-tn {
        text-align: right;
    }

    .wct-fe-tn strong {
        font-size: 15px;
        letter-spacing: 1px;
    }

    .wct-step { width: 70px !important; }
    .wct-step-lbl { font-size: 9px !important; }
    .wct-step-dot { width: 32px !important; height: 32px !important; font-size: 12px !important; }

    .wct-fe-meta {
        gap: 12px;
        padding: 12px 14px;
    }

    .wct-meta-item strong { font-size: 13px; }

    .wct-tl-dot { width: 28px; height: 28px; font-size: 12px; }
    .wct-tl-body strong { font-size: 13px; }

    /* Public tracker */
    .wct-pt-form { padding: 20px; }
    .wct-pt-title { font-size: 18px; }
}

/* ════════════════════════════════════════════
   RESPONSIVE — MOBİL (max-width: 767px)
   ════════════════════════════════════════════ */
@media (max-width: 767px) {

    .wct-fe-card {
        padding: 16px;
        border-radius: 10px;
        margin-bottom: 14px;
    }

    /* Kargo başlığı — dikey düzen */
    .wct-fe-head {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 16px;
    }

    .wct-fe-carrier {
        font-size: 15px;
        gap: 8px;
    }

    .wct-fe-icon { font-size: 20px; }

    .wct-fe-tn {
        text-align: left;
        width: 100%;
        background: #f9fafb;
        border-radius: 8px;
        padding: 10px 14px;
        box-sizing: border-box;
    }

    .wct-fe-tn strong {
        font-size: 16px;
        letter-spacing: 1px;
        word-break: break-all;
    }

    .wct-fe-link {
        font-size: 13px;
        display: inline-block;
        margin-top: 6px;
        background: #eef2ff;
        padding: 4px 10px;
        border-radius: 6px;
    }

    .wct-copy-btn {
        width: 100%;
        text-align: center;
        padding: 8px;
        margin-top: 8px;
        display: block;
        box-sizing: border-box;
    }

    /* Proses adımları — küçük boyut */
    .wct-steps {
        padding: 10px 0 6px !important;
        margin-bottom: 16px !important;
    }

    .wct-step { width: 60px !important; }
    .wct-step-dot {
        width: 30px !important;
        height: 30px !important;
        font-size: 11px !important;
    }
    .wct-step-lbl {
        font-size: 9px !important;
        margin-top: 5px !important;
        max-width: 58px !important;
    }
    .wct-step-line {
        min-width: 10px !important;
        margin-bottom: 22px !important;
    }

    /* Meta bilgiler — full width */
    .wct-fe-meta {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }

    .wct-meta-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f3f4f6;
        padding-bottom: 8px;
    }
    .wct-meta-item:last-child { border-bottom: none; padding-bottom: 0; }
    .wct-meta-item small { text-align: left; }
    .wct-meta-item strong { font-size: 13px; text-align: right; }

    /* Zaman çizelgesi */
    .wct-tl::before { left: 14px; }
    .wct-tl { padding-left: 12px; }
    .wct-tl-dot { width: 28px; height: 28px; font-size: 12px; }
    .wct-tl-item { gap: 10px; margin-bottom: 14px; }
    .wct-tl-body strong { font-size: 13px; }
    .wct-tl-body p { font-size: 12px; }

    /* Hesabım sayfası */
    .wct-account-empty { padding: 32px 16px; }
    .wct-empty-icon { font-size: 36px; }

    .wct-order-ref {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* Public tracker */
    .wct-public-tracker { padding: 0 12px; }
    .wct-pt-form { padding: 16px; border-radius: 10px; }
    .wct-pt-title { font-size: 18px; margin-bottom: 14px; }
    .wct-pt-tab { padding: 8px 10px; font-size: 12px; }
    .wct-pt-input { font-size: 14px; padding: 12px 14px; }
    .wct-pt-btn { font-size: 14px; padding: 13px; }

    /* Durum banner */
    .wct-status-banner { font-size: 14px; padding: 12px; }
}

/* ════════════════════════════════════════════
   RESPONSIVE — KÜÇÜK MOBİL (max-width: 400px)
   ════════════════════════════════════════════ */
@media (max-width: 400px) {

    .wct-fe-card { padding: 12px; }

    .wct-step { width: 52px !important; }
    .wct-step-dot { width: 26px !important; height: 26px !important; font-size: 10px !important; }
    .wct-step-lbl { font-size: 8px !important; max-width: 50px !important; }
    .wct-step-line { min-width: 8px !important; margin-bottom: 18px !important; }

    .wct-fe-tn strong { font-size: 14px; }
    .wct-tl-dot { width: 24px; height: 24px; font-size: 11px; }
    .wct-pt-tab { padding: 7px 8px; font-size: 11px; }
}

/* ════════════════════════════════════════════
   SHOPMAX TEMA ÖZEL OVERRİDELAR
   sm-content-box overflow:hidden, padding:0 sorunları
   ════════════════════════════════════════════ */

/* sm-content-box her zaman overflow visible olmalı */
.sm-content-box,
.sm-content-body,
.sm-page-body {
    overflow: visible !important;
}

/* Kargo kart alanına padding ver — tema padding:0 yapıyor */
.woocommerce-MyAccount-content .wct-account-page {
    padding: 0 !important;
}

/* sm-content-box padding'i kargo kartları için */
.sm-content-box .wct-account-page .wct-fe-card {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ════════════════════════════════════════════
   MOBİL — Shopmax tema 768px breakpoint'i
   ════════════════════════════════════════════ */
@media (max-width: 768px) {

    /* sm-content-box'un overflow hidden'ını kesin geçersiz kıl */
    .sm-content-box {
        overflow: visible !important;
        border-radius: 0 !important;
    }

    .wct-fe-card {
        border-radius: 10px !important;
        padding: 14px !important;
        margin-bottom: 12px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Kargo başlığı mobilde tamamen dikey */
    .wct-fe-head {
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
    }

    .wct-fe-carrier {
        font-size: 15px !important;
        gap: 8px !important;
    }

    /* Takip numarası — tam genişlik kutu */
    .wct-fe-tn {
        width: 100% !important;
        text-align: left !important;
        background: #f8f9fa !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 8px !important;
        padding: 10px 12px !important;
        box-sizing: border-box !important;
    }

    .wct-fe-tn strong {
        font-size: 15px !important;
        letter-spacing: 1px !important;
        word-break: break-all !important;
        display: block !important;
    }

    .wct-fe-link {
        font-size: 12px !important;
        display: inline-block !important;
        margin-top: 6px !important;
        padding: 4px 10px !important;
        background: #eef2ff !important;
        border-radius: 6px !important;
        color: #667eea !important;
    }

    /* Kopyala butonu tam genişlik */
    .wct-copy-btn {
        width: 100% !important;
        display: block !important;
        text-align: center !important;
        padding: 9px 12px !important;
        box-sizing: border-box !important;
        margin-top: 8px !important;
    }

    /* Proses adımları — küçük */
    .wct-steps {
        padding: 10px 0 6px !important;
        margin-bottom: 14px !important;
        gap: 0 !important;
    }

    .wct-step { width: 58px !important; }

    .wct-step-dot {
        width: 28px !important;
        height: 28px !important;
        font-size: 11px !important;
    }

    .wct-step-lbl {
        font-size: 8px !important;
        margin-top: 5px !important;
        max-width: 56px !important;
    }

    .wct-step-line {
        min-width: 8px !important;
        margin-bottom: 20px !important;
    }

    /* Meta bilgiler dikey liste */
    .wct-fe-meta {
        flex-direction: column !important;
        gap: 0 !important;
        padding: 10px 12px !important;
    }

    .wct-meta-item {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 8px 0 !important;
        border-bottom: 1px solid #f3f4f6 !important;
    }

    .wct-meta-item:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }

    .wct-meta-item small { color: #6b7280 !important; }
    .wct-meta-item strong { font-size: 13px !important; }

    /* Zaman çizelgesi */
    .wct-tl-dot {
        width: 26px !important;
        height: 26px !important;
        font-size: 11px !important;
    }

    .wct-tl-item { gap: 10px !important; margin-bottom: 14px !important; }
    .wct-tl-body strong { font-size: 13px !important; }
    .wct-tl-body p { font-size: 12px !important; }

    /* Sipariş ref */
    .wct-order-ref {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 3px !important;
    }

    /* Boş durum */
    .wct-account-empty {
        padding: 30px 16px !important;
        border-radius: 10px !important;
    }

    .wct-empty-icon { font-size: 36px !important; }
}

/* ════════════════════════════════════════════
   KÜÇÜK MOBİL — 480px ve altı
   ════════════════════════════════════════════ */
@media (max-width: 480px) {

    .wct-fe-card { padding: 12px !important; }

    .wct-step { width: 50px !important; }
    .wct-step-dot { width: 24px !important; height: 24px !important; font-size: 10px !important; }
    .wct-step-lbl { font-size: 8px !important; max-width: 48px !important; }
    .wct-step-line { min-width: 6px !important; margin-bottom: 18px !important; }

    .wct-fe-tn strong { font-size: 13px !important; }

    .wct-tl-dot { width: 24px !important; height: 24px !important; }
    .wct-tl::before { left: 12px !important; }
}
