/* Yardım botu — panel, balonlar ve formlar.
   Tema rengi siteyle aynı: rose-600 -> orange-600. */

:root {
    --yb-main: #e11d48;
    --yb-main-2: #ea580c;
}

.yb-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--yb-main), var(--yb-main-2));
    color: #fff;
    font: 600 14px/1 ui-sans-serif, system-ui, sans-serif;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(225, 29, 72, .32);
    transition: transform .18s ease, box-shadow .18s ease;
}

.yb-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(225, 29, 72, .4); }
.yb-btn:focus-visible { outline: 3px solid #fda4af; outline-offset: 2px; }
.yb-btn svg { width: 18px; height: 18px; }
.yb-btn[hidden] { display: none; }

@media (max-width: 480px) {
    .yb-btn { right: 12px; bottom: 12px; padding: 12px 14px; }
    .yb-btn span { display: none; }
}

/* ---------- panel ---------- */

.yb-panel {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    width: min(384px, calc(100vw - 24px));
    height: min(600px, calc(100vh - 32px));
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
    font: 14px/1.55 ui-sans-serif, system-ui, sans-serif;
    color: #0f172a;
}

.yb-panel[hidden] { display: none; }

.yb-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--yb-main), var(--yb-main-2));
    color: #fff;
}

.yb-head-title { font-weight: 700; font-size: 15px; }
.yb-head-sub { font-size: 12px; opacity: .9; }
.yb-head-text { min-width: 0; flex: 1; }

.yb-close {
    margin-left: auto;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.yb-close:hover { background: rgba(255, 255, 255, .3); }

.yb-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ---------- balonlar ---------- */

.yb-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; word-break: break-word; }
.yb-bot { align-self: flex-start; background: #fff; border: 1px solid #e2e8f0; border-bottom-left-radius: 4px; }
.yb-user { align-self: flex-end; background: linear-gradient(135deg, var(--yb-main), var(--yb-main-2)); color: #fff; border-bottom-right-radius: 4px; }
.yb-msg a { color: var(--yb-main); font-weight: 600; }
.yb-user a { color: #fff; text-decoration: underline; }

.yb-typing { display: inline-flex; gap: 4px; align-items: center; }
.yb-typing i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: yb-bounce 1.2s infinite; }
.yb-typing i:nth-child(2) { animation-delay: .18s; }
.yb-typing i:nth-child(3) { animation-delay: .36s; }

@keyframes yb-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5 } 30% { transform: translateY(-4px); opacity: 1 } }

@media (prefers-reduced-motion: reduce) {
    .yb-typing i { animation: none; }
    .yb-btn { transition: none; }
}

/* ---------- seçenek düğmeleri ---------- */

.yb-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }

.yb-opt {
    padding: 9px 13px;
    border: 1px solid #fecdd3;
    border-radius: 999px;
    background: #fff;
    color: #9f1239;
    font: 600 13px/1.2 inherit;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.yb-opt:hover { background: #fff1f2; border-color: var(--yb-main); }
.yb-opt-back { color: #475569; border-color: #e2e8f0; }
.yb-opt-back:hover { background: #f1f5f9; border-color: #94a3b8; }

/* ---------- formlar ---------- */

.yb-form { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.yb-form label { font-size: 12px; font-weight: 600; color: #475569; }

.yb-form input,
.yb-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    color: #0f172a;
    background: #fff;
}

.yb-form input:focus,
.yb-form textarea:focus { outline: 2px solid var(--yb-main); outline-offset: -1px; border-color: transparent; }
.yb-form textarea { min-height: 84px; resize: vertical; }

.yb-submit {
    padding: 11px 14px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--yb-main), var(--yb-main-2));
    color: #fff;
    font: 700 14px/1 inherit;
    cursor: pointer;
}

.yb-submit:disabled { opacity: .6; cursor: not-allowed; }
.yb-error { color: #be123c; font-size: 12px; font-weight: 600; }

/* ---------- sipariş kartı ---------- */

.yb-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 13px; width: 100%; }
.yb-card-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; }
.yb-card-row span:first-child { color: #64748b; }
.yb-card-row span:last-child { font-weight: 600; text-align: right; }
.yb-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #fff1f2; color: #9f1239; font-size: 12px; font-weight: 700; }
.yb-bar { height: 6px; border-radius: 999px; background: #e2e8f0; overflow: hidden; margin: 9px 0 4px; }
.yb-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--yb-main), var(--yb-main-2)); }

/* ---------- karanlık mod ---------- */

.dark .yb-panel { background: #0f172a; border-color: #1e293b; color: #e2e8f0; }
.dark .yb-body { background: #020617; }
.dark .yb-bot { background: #0f172a; border-color: #1e293b; color: #e2e8f0; }
.dark .yb-opt { background: #0f172a; border-color: #4c0519; color: #fda4af; }
.dark .yb-opt:hover { background: #1e293b; }
.dark .yb-opt-back { color: #94a3b8; border-color: #1e293b; }
.dark .yb-card { background: #0f172a; border-color: #1e293b; }
.dark .yb-badge { background: #4c0519; color: #fda4af; }
.dark .yb-bar { background: #1e293b; }
.dark .yb-form input,
.dark .yb-form textarea { background: #0f172a; border-color: #334155; color: #e2e8f0; }
.dark .yb-form label { color: #94a3b8; }
