/**
 * Supplement Chatbot — Frontend Widget Styles
 * İki ekranlı yapı: karşılama (10 kart) ↔ chat
 */

.suppcalc-chatbot {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: #1a2e2a;
    margin: 16px auto;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    max-width: 560px;
}

/* ============ HEADER ============ */
.suppcalc-chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #134e3a 0%, #1f6e54 100%);
    color: #fff;
}

.suppcalc-chat-bot-icon {
    font-size: 26px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.suppcalc-chat-header-text { flex: 1; min-width: 0; }
.suppcalc-chat-bot-name { font-size: 15px; font-weight: 700; line-height: 1.2; }
.suppcalc-chat-bot-status { font-size: 12px; opacity: 0.85; margin-top: 2px; }

.suppcalc-chat-status-dot {
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    animation: suppcalc-pulse 2s infinite;
    flex-shrink: 0;
}

@keyframes suppcalc-pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ============ KARSILAMA EKRANI ============ */
.suppcalc-welcome-screen {
    padding: 20px 18px 18px;
    background: #f8fafc;
}

.suppcalc-welcome-intro {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 18px;
    color: #1a2e2a;
    font-size: 14px;
    line-height: 1.55;
}

.suppcalc-welcome-intro p {
    margin: 0 0 8px;
}

.suppcalc-welcome-intro p:last-child {
    margin-bottom: 0;
}

.suppcalc-welcome-intro strong { color: #134e3a; }

/* ============ AKILLI ARAMA — Kimi web search ============ */
.suppcalc-smart-section {
    margin-bottom: 18px;
    padding: 14px 14px 12px;
    background: linear-gradient(135deg, #fdf4ff 0%, #fff7ed 100%);
    border: 1.5px solid #f0abfc;
    border-radius: 14px;
    position: relative;
}

.suppcalc-smart-label {
    font-size: 11px;
    color: #86198f;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-align: center;
    margin-bottom: 10px;
}

.suppcalc-smart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Sadece bir buton varsa tek kolonlu grid */
.suppcalc-smart-grid-single {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
}

.suppcalc-smart-btn {
    background: #fff;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 14px 14px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    font-family: inherit;
    color: #1a2e2a;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.suppcalc-smart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}

.suppcalc-smart-btn:active {
    transform: translateY(0);
}

/* Yorumlar — mor gradient kenarlı */
.suppcalc-smart-btn-reviews {
    background: linear-gradient(135deg, #faf5ff 0%, #fff 60%);
    border-color: #c084fc;
}

.suppcalc-smart-btn-reviews:hover {
    border-color: #a855f7;
    background: linear-gradient(135deg, #f3e8ff 0%, #fdfaff 60%);
}

/* Satıcılar — turuncu gradient kenarlı */
.suppcalc-smart-btn-sellers {
    background: linear-gradient(135deg, #fff7ed 0%, #fff 60%);
    border-color: #fdba74;
}

.suppcalc-smart-btn-sellers:hover {
    border-color: #fb923c;
    background: linear-gradient(135deg, #ffedd5 0%, #fff8f0 60%);
}

.suppcalc-smart-icon {
    font-size: 26px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.suppcalc-smart-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.suppcalc-smart-title {
    font-size: 13px;
    font-weight: 700;
    color: #1a2e2a;
    line-height: 1.25;
}

.suppcalc-smart-btn-reviews .suppcalc-smart-title { color: #6b21a8; }
.suppcalc-smart-btn-sellers .suppcalc-smart-title { color: #9a3412; }

.suppcalc-smart-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.35;
}

/* ============ TOP QUESTIONS LABEL (mevcut) ============ */
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 0 4px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suppcalc-questions-label::before,
.suppcalc-questions-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #cbd5e1;
}

.suppcalc-questions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.suppcalc-q-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 14px 14px 12px;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    font-family: inherit;
    color: #1a2e2a;
    font-size: 13px;
    line-height: 1.4;
    width: 100%;
    min-height: 72px;
}

.suppcalc-q-card:hover {
    border-color: #1f6e54;
    background: #f0fdf4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 110, 84, 0.12);
}

.suppcalc-q-card:active {
    transform: translateY(0);
}

.suppcalc-q-icon {
    font-size: 20px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 1px;
}

.suppcalc-q-text {
    flex: 1;
    font-weight: 500;
}

/* Serbest soru bölümü */
.suppcalc-freeform-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #cbd5e1;
}

.suppcalc-freeform-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
    text-align: center;
}

.suppcalc-freeform-form {
    border-top: none !important;
    padding: 0 !important;
    background: transparent !important;
}

/* ============ CHAT EKRANI ============ */
.suppcalc-chat-screen {
    background: #f8fafc;
    flex-direction: column;
    /* max-height ve min-height yok — widget doğal yüksekliğine yayılır,
       sayfa scroll'u kullanılır (içeride ayrı scrollbar yok) */
}

.suppcalc-chat-screen[style*="display: flex"] {
    display: flex !important;
}

.suppcalc-back-bar {
    padding: 10px 18px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
}

.suppcalc-back-btn {
    background: none;
    border: none;
    color: #1f6e54;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    transition: color 0.15s;
}

.suppcalc-back-btn:hover {
    color: #134e3a;
}

.suppcalc-chat-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    /* overflow-y yok — içerik doğal akışta, sayfa scroll'u yeter */
}

.suppcalc-chat-message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    animation: suppcalc-msg-in 0.32s ease;
}

@keyframes suppcalc-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.suppcalc-chat-message-user {
    flex-direction: row-reverse;
}

.suppcalc-chat-avatar {
    width: 34px;
    height: 34px;
    background: #fff;
    border: 2px solid #1f6e54;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.suppcalc-chat-message-user .suppcalc-chat-avatar {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.suppcalc-chat-bubble {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px 16px;
    flex: 1;
    line-height: 1.55;
    font-size: 14px;
    color: #1a2e2a;
    border-top-left-radius: 4px;
}

.suppcalc-chat-bubble p {
    margin: 0 0 8px;
}

.suppcalc-chat-bubble p:last-child {
    margin-bottom: 0;
}

.suppcalc-chat-bubble strong {
    color: #0f3a2c;
    font-weight: 700;
}

.suppcalc-chat-bubble em {
    font-style: italic;
    color: #475569;
}

.suppcalc-chat-bubble ul {
    margin: 6px 0 10px;
    padding: 0 0 0 20px;
    list-style: none;
}

.suppcalc-chat-bubble ul li {
    position: relative;
    padding: 4px 0 4px 4px;
    line-height: 1.5;
}

.suppcalc-chat-bubble ul li::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 11px;
    width: 6px;
    height: 6px;
    background: #1f6e54;
    border-radius: 50%;
}

.suppcalc-chat-bubble ul li:last-child {
    padding-bottom: 0;
}

.suppcalc-chat-bubble ul + p {
    margin-top: 4px;
}

/* Affiliate link — doğal ama belirgin */
.suppcalc-chat-bubble .affiliate-link {
    color: #1f6e54;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #6ee7b7;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: all 0.15s;
}

.suppcalc-chat-bubble .affiliate-link:hover {
    color: #134e3a;
    text-decoration-color: #1f6e54;
    background: #f0fdf4;
    border-radius: 3px;
    padding: 0 2px;
}

.suppcalc-chat-message-user .suppcalc-chat-bubble {
    background: #1f6e54;
    color: #fff;
    border-color: #1f6e54;
    border-radius: 16px;
    border-top-right-radius: 4px;
    border-top-left-radius: 16px;
    flex: 0 1 auto;
    max-width: 75%;
}

/* Yazıyor animasyonu */
.suppcalc-typing-dots {
    display: flex;
    gap: 5px;
    padding: 4px 0;
}

.suppcalc-typing-dots span {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: suppcalc-typing 1.2s infinite ease-in-out;
}

.suppcalc-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.suppcalc-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes suppcalc-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

.suppcalc-chat-error {
    color: #dc2626;
    background: #fee2e2;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
}

/* ============ CHIP BAR (chat ekranında diğer sorular) ============ */
.suppcalc-chat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.suppcalc-chip {
    flex: 0 1 auto;
    max-width: 100%;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 99px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #475569;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1.2;
}

.suppcalc-chip:hover {
    background: #ecfdf5;
    border-color: #1f6e54;
    color: #134e3a;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(31, 110, 84, 0.12);
}

.suppcalc-chip:active {
    transform: translateY(0);
}

.suppcalc-chip-icon {
    font-size: 13px;
    line-height: 1;
    flex-shrink: 0;
}

.suppcalc-chip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* Akıllı arama chip'leri (yorumlar + satıcılar) — özel renkli */
.suppcalc-chip-special {
    font-weight: 600;
}

.suppcalc-chip-reviews {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border-color: #c084fc;
    color: #6b21a8;
}

.suppcalc-chip-reviews:hover {
    background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
    border-color: #a855f7;
    color: #581c87;
    box-shadow: 0 2px 6px rgba(168, 85, 247, 0.18);
}

.suppcalc-chip-sellers {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fdba74;
    color: #9a3412;
}

.suppcalc-chip-sellers:hover {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    border-color: #fb923c;
    color: #7c2d12;
    box-shadow: 0 2px 6px rgba(251, 146, 60, 0.22);
}

/* ============ CEVAP TABLOSU (yorumlar + satıcılar) ============ */
.suppcalc-chat-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0 4px;
    font-size: 13px;
    line-height: 1.4;
}

/* Marka logosu — platform/satıcı adının başında küçük SVG (CDN) +
   yüklenemezse renkli harf rozeti fallback (JS'le aktif olur) */
.suppcalc-platform-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 7px;
    vertical-align: -4px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.suppcalc-platform-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.suppcalc-logo-fallback {
    display: none; /* Default gizli — JS img.onerror'da göstermesi için is-fallback class ekler */
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #94a3b8; /* Default gri — JS data-color ile override eder */
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
}

.suppcalc-platform-logo-wrap.is-fallback .suppcalc-platform-logo {
    display: none;
}

.suppcalc-platform-logo-wrap.is-fallback .suppcalc-logo-fallback {
    display: inline-flex;
}

.suppcalc-chat-bubble thead {
    background: #f0fdf4;
}

.suppcalc-chat-bubble th {
    text-align: left;
    padding: 8px 10px;
    font-weight: 700;
    font-size: 11px;
    color: #134e3a;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid #86d6b3;
    white-space: nowrap;
}

.suppcalc-chat-bubble td {
    padding: 9px 10px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    color: #1a2e2a;
}

.suppcalc-chat-bubble tbody tr:last-child td {
    border-bottom: none;
}

.suppcalc-chat-bubble tbody tr:hover {
    background: #f8fafc;
}

/* Tablodaki linkler — kompakt ve belirgin */
.suppcalc-chat-bubble table a {
    color: #1f6e54;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: #6ee7b7;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
    display: inline-block;
}

/* Hücrede birden fazla link varsa, alt alta sıralansın (desktop ve mobil) */
.suppcalc-chat-bubble td a + br + a,
.suppcalc-chat-bubble td a + a {
    margin-top: 2px;
}
.suppcalc-chat-bubble td br + a {
    display: inline-block;
}

.suppcalc-chat-bubble table a:hover {
    color: #134e3a;
    text-decoration-color: #1f6e54;
}

/* ÖNERİLEN — resmi satıcı satırı (her zaman ilk sırada) */
.suppcalc-chat-bubble tr.suppcalc-row-official {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.suppcalc-chat-bubble tr.suppcalc-row-official:hover {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.suppcalc-chat-bubble tr.suppcalc-row-official td {
    padding: 11px 10px;
    font-weight: 500;
    border-bottom: 2px solid #6ee7b7;
}

.suppcalc-chat-bubble tr.suppcalc-row-official td:first-child {
    color: #065f46;
}

.suppcalc-recommended-badge {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: 4px;
    vertical-align: middle;
    white-space: nowrap;
}

.suppcalc-chat-bubble tr.suppcalc-row-official a.affiliate-link {
    background: #16a34a;
    color: #fff !important;
    padding: 5px 10px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    transition: background 0.15s;
}

.suppcalc-chat-bubble tr.suppcalc-row-official a.affiliate-link:hover {
    background: #15803d;
    color: #fff !important;
}

/* ============ INPUT FORM ============ */
.suppcalc-input-form {
    display: flex;
    gap: 8px;
    padding: 12px 18px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    align-items: center;
}

.suppcalc-input-field {
    flex: 1;
    padding: 11px 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 24px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    color: #1a2e2a;
}

.suppcalc-input-field:focus {
    border-color: #1f6e54;
}

.suppcalc-send-btn {
    width: 42px;
    height: 42px;
    background: #1f6e54;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.15s;
    flex-shrink: 0;
}

.suppcalc-send-btn:hover {
    background: #134e3a;
    transform: scale(1.05);
}

.suppcalc-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE — 640px ve altı
   Strateji: widget içinde scroll YOK, sayfa scroll'u kullanılır.
   Tablolar kart-stilinde gösterilir. Touch hedefleri büyütülür.
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {

    /* ---- WIDGET KAPSAMI ---- */
    .suppcalc-chatbot {
        margin: 8px 0;
        border-radius: 12px;
        max-width: 100% !important;
        width: 100%;
    }

    /* ---- CHAT EKRANI: doğal yükseklik, içsel scroll YOK ---- */
    .suppcalc-chat-screen {
        min-height: 0;
        max-height: none;
    }

    /* ---- CHAT BODY: doğal yükseklik, içsel scroll YOK ---- */
    .suppcalc-chat-body {
        padding: 14px;
        max-height: none;
        overflow: visible;
    }

    /* ---- HEADER: kompakt ---- */
    .suppcalc-chat-header {
        padding: 12px 14px;
    }
    .suppcalc-chat-bot-icon {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
    .suppcalc-chat-bot-name { font-size: 14px; }
    .suppcalc-chat-bot-status { font-size: 11px; }

    /* ---- KARSILAMA EKRANI ---- */
    .suppcalc-welcome-screen {
        padding: 14px 14px 16px;
    }
    .suppcalc-welcome-intro {
        padding: 14px;
        font-size: 13px;
        line-height: 1.5;
    }

    /* ---- AKILLI ARAMA — tek sütun, daha kompakt ---- */
    .suppcalc-smart-section {
        padding: 12px;
        margin-bottom: 14px;
    }
    .suppcalc-smart-grid,
    .suppcalc-smart-grid-single {
        grid-template-columns: 1fr;
        max-width: none;
    }
    .suppcalc-smart-btn {
        padding: 12px 14px;
        min-height: 56px;
    }
    .suppcalc-smart-icon {
        font-size: 22px;
    }
    .suppcalc-smart-title {
        font-size: 13px;
    }
    .suppcalc-smart-desc {
        font-size: 11px;
    }

    /* ---- 10 SORU KARTLARI: tek sütun, daha basık ---- */
    .suppcalc-questions-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .suppcalc-q-card {
        font-size: 13px;
        min-height: 52px;
        padding: 12px 14px;
    }

    /* ---- MESAJLAR: daha geniş baloncuk, mobil okuma için ---- */
    .suppcalc-chat-message {
        gap: 8px;
    }
    .suppcalc-chat-bubble {
        font-size: 13px;
        padding: 10px 12px;
        max-width: calc(100% - 40px);
        line-height: 1.5;
    }
    .suppcalc-chat-avatar {
        width: 30px;
        height: 30px;
        font-size: 15px;
        flex-shrink: 0;
    }

    /* ---- INPUT FORM ---- */
    .suppcalc-input-form {
        padding: 10px 12px;
    }
    .suppcalc-input-field {
        font-size: 16px; /* iOS Safari 16px altı zoom yapıyor — bu engellemek için */
        padding: 10px 14px;
    }
    .suppcalc-send-btn {
        width: 44px;
        height: 44px; /* Apple HIG min touch target */
        flex-shrink: 0;
    }

    /* ---- CHIP BAR: temiz wrap, scrollbar yok ---- */
    .suppcalc-chat-chips {
        padding: 10px 12px;
        gap: 6px;
    }
    .suppcalc-chip {
        padding: 7px 12px;
        font-size: 12px;
        min-height: 32px; /* daha iyi tap target */
    }
    .suppcalc-chip-icon {
        font-size: 13px;
    }

    /* ─────────────────────────────────────────────────────────
       MOBİLDE TABLO — KART STİLİ (yatay scroll yok!)
       Her satır bir kart olur, başlıklar her hücrenin üstünde
       data-label içeriği olarak gösterilir (JS attribute ekler).
       ───────────────────────────────────────────────────────── */
    .suppcalc-chat-bubble table {
        display: block;
        border-collapse: separate;
        white-space: normal;
        font-size: 14px;
    }

    .suppcalc-chat-bubble thead {
        display: none; /* Başlık satırı gizli — her hücrede inline başlık var */
    }

    .suppcalc-chat-bubble tbody {
        display: block;
    }

    .suppcalc-chat-bubble tbody tr {
        display: block;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        padding: 13px 15px;
        margin-bottom: 11px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }

    .suppcalc-chat-bubble tbody tr:hover {
        background: #fff; /* Hover effect mobilde gereksiz */
    }

    .suppcalc-chat-bubble tbody tr td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding: 7px 0;
        border-bottom: 1px dashed #f1f5f9;
        text-align: right;
    }

    .suppcalc-chat-bubble tbody tr td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .suppcalc-chat-bubble tbody tr td:first-child {
        padding-top: 0;
    }

    /* Her hücrenin başına data-label içeriğini etiket olarak yaz */
    .suppcalc-chat-bubble tbody tr td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        font-size: 11.5px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        flex-shrink: 0;
        text-align: left;
    }

    /* İlk hücre (platform/satıcı adı) — data-label gizli, isim büyük gösterilir */
    .suppcalc-chat-bubble tbody tr td:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        text-align: left;
    }
    .suppcalc-chat-bubble tbody tr td:first-child::before {
        font-size: 10px;
        opacity: 0.7;
    }
    .suppcalc-chat-bubble tbody tr td:first-child {
        font-size: 15.5px;
        font-weight: 600;
        color: #1a2e2a;
    }

    /* Mobilde logo biraz daha büyük + sıkı hizalama */
    .suppcalc-platform-logo-wrap {
        width: 20px;
        height: 20px;
        margin-right: 8px;
        vertical-align: -5px;
    }
    .suppcalc-platform-logo {
        width: 20px;
        height: 20px;
    }
    .suppcalc-logo-fallback {
        width: 20px;
        height: 20px;
        font-size: 11.5px;
    }

    /* RESMİ SATIR — vurgulu yeşil kart */
    .suppcalc-chat-bubble tbody tr.suppcalc-row-official {
        background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
        border-color: #6ee7b7;
        border-width: 2px;
        padding: 12px 14px;
    }
    .suppcalc-chat-bubble tbody tr.suppcalc-row-official td {
        border-bottom-color: rgba(110, 231, 183, 0.4);
    }
    .suppcalc-chat-bubble tbody tr.suppcalc-row-official td a.affiliate-link {
        display: inline-block;
        padding: 8px 14px;
        font-size: 13px;
    }

    .suppcalc-recommended-badge {
        margin-left: 0;
        margin-top: 4px;
    }

    /* Tablodaki linkler — daha touch-friendly */
    .suppcalc-chat-bubble tbody tr td a {
        padding: 4px 0;
        display: inline-block;
        word-break: break-word;
        max-width: 100%;
    }

    /* Hücrede birden fazla link varsa — kompakt liste, hücreyi ezme */
    .suppcalc-chat-bubble tbody tr td:has(a + a),
    .suppcalc-chat-bubble tbody tr td:has(a + br + a) {
        flex-direction: column !important;
        align-items: flex-end !important;
        gap: 2px !important;
    }
    .suppcalc-chat-bubble tbody tr td:has(a + a)::before,
    .suppcalc-chat-bubble tbody tr td:has(a + br + a)::before {
        align-self: flex-start;
        margin-bottom: 4px;
    }

    /* ─────────────────────────────────────────────────────────
       TABLO İÇEREN MESAJ — avatar gizli, bubble tam genişlik.
       Kartlar tüm widget genişliğini kullanır, dekorasyon yok.
       ───────────────────────────────────────────────────────── */
    .suppcalc-chat-message-bot:has(table) {
        gap: 0;
    }
    .suppcalc-chat-message-bot:has(table) .suppcalc-chat-avatar {
        display: none; /* Tablolu cevapta avatar gizli — bubble'a daha çok yer */
    }
    .suppcalc-chat-bubble:has(table) {
        max-width: 100%;
        width: 100%;
        padding: 4px 0;
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
    }

    /* Kart içi flex hücreler — uzun değerlerde sığmama sorununu çöz */
    .suppcalc-chat-bubble tbody tr td {
        gap: 8px;
    }
    /* Platform/satıcı adı (ilk hücre) word-break ile sığsın */
    .suppcalc-chat-bubble tbody tr td:first-child {
        word-break: break-word;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ÇOK KÜÇÜK EKRAN — 380px ve altı (iPhone SE eski, vb.)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
    .suppcalc-welcome-screen { padding: 12px 10px 14px; }
    .suppcalc-welcome-intro { padding: 12px; font-size: 12.5px; }
    .suppcalc-chat-body { padding: 12px 10px; }
    .suppcalc-smart-section { padding: 10px; }
    .suppcalc-q-card { font-size: 12.5px; padding: 10px 12px; min-height: 48px; }
    .suppcalc-chat-bubble { font-size: 12.5px; padding: 9px 11px; }
    .suppcalc-chat-bubble tbody tr { padding: 9px 10px; }
}
