/* ==========================================================================
   by_QOR — Yapay zekâ rezervasyon asistanı widget'ı (frontend/partials/qor_assistant.blade.php)
   ========================================================================== */
.qas-fab {
    position: fixed; right: 22px; bottom: 22px; z-index: 99998;
    display: inline-flex; align-items: center; gap: 9px; height: 52px; padding: 0 18px 0 14px;
    border: 0; border-radius: 999px; cursor: pointer; color: #fff;
    background: linear-gradient(135deg, #ff7a1a, #e8600a);
    box-shadow: 0 14px 30px -10px rgba(255, 122, 26, .7);
    font: 700 14.5px 'Plus Jakarta Sans', system-ui, sans-serif;
    transition: transform .18s ease;
}
.qas-fab:hover { transform: translateY(-2px); }
.qas-fab svg { width: 22px; height: 22px; }
.qas-fab .qas-dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61, 220, 132, .25); }
body.qor-has-tabbar .qas-fab { bottom: 86px; }
@media (min-width: 901px) { body.qor-has-tabbar .qas-fab { bottom: 22px; } }

.qas-panel {
    position: fixed; right: 22px; bottom: 22px; z-index: 99999;
    width: min(400px, calc(100vw - 24px)); height: min(620px, calc(100vh - 120px));
    display: flex; flex-direction: column; overflow: hidden;
    border-radius: 22px; background: #0f1a2c; border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: #f4f6fb;
    animation: qasIn .2s ease-out;
}
.qas-panel[hidden] { display: none; }
@keyframes qasIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.qas-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: linear-gradient(135deg, #1c3b55, #121d31); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.qas-av { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #ff7a1a, #e8600a); color: #fff; }
.qas-av svg { width: 21px; height: 21px; }
.qas-head b { display: block; font: 700 15px 'Space Grotesk', system-ui, sans-serif; }
.qas-head small { display: block; font-size: 12px; color: rgba(255, 255, 255, .6); }
.qas-head-btns { margin-left: auto; display: flex; gap: 4px; }
.qas-ib { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .75); cursor: pointer; }
.qas-ib:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.qas-ib svg { width: 17px; height: 17px; }

.qas-log { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.qas-msg { max-width: 86%; padding: 10px 13px; border-radius: 16px; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.qas-msg a { color: #ffb27a; }
.qas-msg--bot { align-self: flex-start; background: rgba(255, 255, 255, .07); border-bottom-left-radius: 5px; }
.qas-msg--me { align-self: flex-end; background: #ff7a1a; color: #fff; border-bottom-right-radius: 5px; }
.qas-msg--err { align-self: center; background: rgba(255, 107, 107, .13); color: #ff9b9b; font-size: 13px; }
.qas-msg ul { margin: 6px 0 0; padding-left: 18px; }
.qas-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 13px 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); }
.qas-typing i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); animation: qasDot 1.1s infinite ease-in-out; }
.qas-typing i:nth-child(2) { animation-delay: .15s; } .qas-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes qasDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.qas-sugs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.qas-sug { padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(255, 122, 26, .45); background: rgba(255, 122, 26, .1); color: #ffd0ad; font: 600 12.5px inherit; font-family: inherit; cursor: pointer; }
.qas-sug:hover { background: rgba(255, 122, 26, .22); color: #fff; }

/* onay kartı */
.qas-card { align-self: stretch; padding: 14px; border-radius: 16px; background: #fff; color: #121d31; box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .6); }
.qas-card h4 { margin: 0 0 10px; font: 700 15px 'Space Grotesk', system-ui, sans-serif; }
.qas-card dl { margin: 0; display: grid; gap: 6px; }
.qas-card dl div { display: grid; grid-template-columns: 78px 1fr; gap: 8px; font-size: 13px; }
.qas-card dt { color: #6b7385; font-weight: 600; }
.qas-card dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.qas-card label.qas-terms { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 12.5px; color: #3a4558; }
.qas-card label.qas-terms a { color: #e8600a; }
.qas-card-btns { display: flex; gap: 8px; margin-top: 12px; }
.qas-btn { flex: 1; height: 42px; border: 0; border-radius: 12px; cursor: pointer; font: 700 14px inherit; font-family: inherit; }
.qas-btn--ok { background: linear-gradient(135deg, #ff7a1a, #e8600a); color: #fff; }
.qas-btn--danger { background: #e5484d; color: #fff; }
.qas-btn--ghost { flex: 0 0 auto; padding: 0 14px; background: #eef1f6; color: #3a4558; }
.qas-btn:disabled { opacity: .55; cursor: default; }
.qas-card .qas-otp { display: flex; gap: 8px; margin-top: 10px; }
.qas-card .qas-otp input { flex: 1; height: 42px; padding: 0 12px; border: 1px solid #d9dee8; border-radius: 12px; font: 700 16px inherit; letter-spacing: .2em; }
.qas-card .qas-res { margin-top: 10px; font-size: 13px; font-weight: 600; }
.qas-card .qas-res.ok { color: #1fa463; }
.qas-card .qas-res.bad { color: #e5484d; }
.qas-card.is-done { opacity: .75; }

.qas-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid rgba(255, 255, 255, .08); background: #0c1626; }
.qas-form textarea {
    flex: 1; min-height: 44px; max-height: 120px; resize: none; padding: 11px 14px; border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: #fff; font: 500 14px inherit; font-family: inherit; outline: 0;
}
.qas-form textarea:focus { border-color: #ff7a1a; box-shadow: 0 0 0 3px rgba(255, 122, 26, .2); }
.qas-send { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 14px; background: #ff7a1a; color: #fff; cursor: pointer; }
.qas-send:disabled { opacity: .5; cursor: default; }
.qas-send svg { width: 19px; height: 19px; }
.qas-foot { padding: 0 14px 10px; background: #0c1626; font-size: 10.5px; color: rgba(255, 255, 255, .4); text-align: center; }

.qas-close-l { display: none; }

/* mobil: tam sayfa, büyük ve kolay kapatma */
@media (max-width: 720px) {
    .qas-panel { inset: 0; right: 0; bottom: 0; width: 100vw; height: 100vh; height: 100dvh; max-height: none; border: 0; border-radius: 0;
        padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); animation: qasUp .22s ease-out; }
    @keyframes qasUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
    .qas-head { position: relative; padding: 18px 12px 12px 14px; }
    .qas-head::before { content: ''; position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255, 255, 255, .25); }
    #qasClose { width: auto; height: 42px; padding: 0 14px; gap: 6px; display: inline-flex; align-items: center; border-radius: 12px;
        background: rgba(255, 255, 255, .12); color: #fff; font: 700 14px inherit; font-family: inherit; }
    #qasClose svg { width: 18px; height: 18px; }
    .qas-close-l { display: inline; }
    .qas-ib { width: 42px; height: 42px; }
    .qas-msg { max-width: 92%; font-size: 15px; }
    .qas-form textarea { font-size: 16px; } /* iOS yakınlaştırmasın */
    .qas-fab span.qas-lbl { display: none; }
    .qas-fab { padding: 0 15px; }
    body.qas-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .qas-panel, .qas-typing i { animation: none; } }
