/* Home — «اسأل واتيلي AI» (views/public/partials/home_advisor.php, v2 framed). */
.wt-adv { position: relative; padding: clamp(4rem, 9vw, 7rem) 0; overflow: hidden; font-family: inherit; }
.wt-adv button, .wt-adv textarea { font-family: inherit; }
.wt-adv__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wt-adv__bg { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, #FBFAF8 0%, #F3F1EE 100%); }
.wt-adv__glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.wt-adv__glow--1 { width: 520px; height: 420px; top: -160px; inset-inline-start: 50%; transform: translateX(-50%); background: rgba(240, 108, 20, .22); }
[dir="rtl"] .wt-adv__glow--1 { transform: translateX(50%); }
.wt-adv__glow--2 { width: 380px; height: 320px; bottom: -120px; inset-inline-end: -80px; background: rgba(250, 144, 58, .14); }
.wt-adv__inner { position: relative; max-width: 860px; }

/* Header */
.wt-adv__head { text-align: center; margin-bottom: 2rem; }
.wt-adv__eyebrow { display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 .8rem; padding: .35rem .9rem; border-radius: 999px; font-size: .82rem; font-weight: 800; color: var(--wt-orange-700); background: rgba(255, 255, 255, .8); border: 1px solid rgba(240, 108, 20, .22); box-shadow: 0 4px 14px -8px rgba(240, 108, 20, .5); }
.wt-adv__eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wt-orange-500); box-shadow: 0 0 0 0 rgba(240, 108, 20, .5); animation: wtAdvPing 2s ease-out infinite; }
@keyframes wtAdvPing { 0% { box-shadow: 0 0 0 0 rgba(240, 108, 20, .5); } 80%, 100% { box-shadow: 0 0 0 8px rgba(240, 108, 20, 0); } }
.wt-adv__title { margin: 0 0 .7rem; font-size: clamp(1.6rem, 3.6vw, 2.45rem); font-weight: 800; line-height: 1.3; color: var(--wt-ink-900); letter-spacing: -.01em; }
.wt-adv__lead { margin: 0 auto; max-width: 38rem; color: var(--wt-ink-600); font-size: 1.03rem; line-height: 1.75; }

/* Frame */
.wt-adv__frame {
    position: relative; isolation: isolate; border-radius: 28px; background: #fff;
    border: 1px solid rgba(15, 23, 42, .09);
}
.wt-adv__frame::before {
    content: ''; position: absolute; inset: -1.5px; z-index: -1; border-radius: 29.5px; padding: 1.5px; opacity: 0; transition: opacity .5s;
    background: conic-gradient(from var(--wt-adv-a, 0deg), rgba(240, 108, 20, 0) 0deg, #F06C14 70deg, #FDC9A1 120deg, rgba(240, 108, 20, 0) 200deg, rgba(240, 108, 20, 0) 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    animation: wtAdvSpin 2.4s linear infinite;
}
.wt-adv__frame[data-state="thinking"]::before, .wt-adv__frame[data-state="answering"]::before { opacity: 1; }
@property --wt-adv-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes wtAdvSpin { to { --wt-adv-a: 360deg; } }

.wt-adv__bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1.1rem; border-bottom: 1px solid rgba(15, 23, 42, .07); }
.wt-adv__id { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.wt-adv__badge { width: 52px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: #FFF4EC; border: 1px solid rgba(240, 108, 20, .18); flex: none; }
.wt-adv__id-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.wt-adv__id-text strong { font-size: .98rem; color: var(--wt-ink-900); }
.wt-adv__status { display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; color: var(--wt-ink-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-adv__status i { width: 7px; height: 7px; border-radius: 50%; background: #10B981; flex: none; }
.wt-adv__frame[data-state="thinking"] .wt-adv__status i { background: var(--wt-orange-500); animation: wtAdvBlink 1s ease-in-out infinite; }
@keyframes wtAdvBlink { 50% { opacity: .25; } }
.wt-adv__tools { display: flex; gap: .4rem; flex: none; }
.wt-adv__tool { display: inline-flex; align-items: center; gap: .35rem; height: 34px; padding: 0 .75rem; border-radius: 10px; border: 1px solid rgba(15, 23, 42, .1); background: #fff; color: var(--wt-ink-700); font-size: .8rem; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s; }
.wt-adv__tool:hover { background: var(--wt-ink-50); border-color: rgba(15, 23, 42, .18); }
.wt-adv__tool b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; font-size: .7rem; color: #fff; background: var(--wt-orange-500); }
.wt-adv__tool[hidden], .wt-adv__hist[hidden] { display: none; }
.wt-adv__hist { position: relative; }
.wt-adv__menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 20; width: min(320px, 80vw); max-height: 320px; overflow-y: auto; padding: .5rem; border-radius: 16px; background: #fff; border: 1px solid rgba(15, 23, 42, .1); box-shadow: 0 24px 50px -20px rgba(15, 23, 42, .35); animation: wtAdvIn .2s ease both; }
.wt-adv__menu[hidden] { display: none; }
.wt-adv__menu-title { margin: .25rem .5rem .4rem; font-size: .72rem; font-weight: 800; color: var(--wt-ink-400); }
.wt-adv__menu-item { display: block; width: 100%; text-align: start; padding: .55rem .65rem; border: 0; border-radius: 10px; background: none; color: var(--wt-ink-800); font-size: .85rem; line-height: 1.5; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-adv__menu-item:hover { background: #FFF4EC; color: var(--wt-orange-700); }
.wt-adv__menu-clear { display: block; width: 100%; margin-top: .3rem; padding: .5rem; border: 0; border-top: 1px solid rgba(15, 23, 42, .07); background: none; color: var(--wt-ink-500); font-size: .78rem; cursor: pointer; }
.wt-adv__menu-clear:hover { color: #DC2626; }

/* Stage */
.wt-adv__stage { position: relative; min-height: 400px; padding: clamp(1.25rem, 3vw, 2rem); display: flex; flex-direction: column; }
.wt-adv__welcome { margin: auto; text-align: center; max-width: 560px; animation: wtAdvIn .5s ease both; }
.wt-adv__welcome[hidden] { display: none; }
.wt-adv__hero-mark { position: relative; width: 150px; height: 124px; margin: 0 auto 1.1rem; display: grid; place-items: center; }
.wt-adv__halo { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(240, 108, 20, .18), transparent 70%); animation: wtAdvHalo 3.2s ease-in-out infinite; }
@keyframes wtAdvHalo { 50% { transform: scale(1.18); opacity: .6; } }
.wt-adv__welcome-q { margin: 0 0 1.2rem; font-size: 1.12rem; font-weight: 800; color: var(--wt-ink-900); }
.wt-adv__examples, .wt-adv__follow { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.wt-adv__chip { border: 1px solid rgba(15, 23, 42, .12); background: #fff; color: var(--wt-ink-700); border-radius: 999px; padding: .5rem .95rem; font-size: .86rem; font-weight: 600; line-height: 1.45; cursor: pointer; transition: border-color .2s, color .2s, background .2s, transform .2s; }
.wt-adv__chip:hover { border-color: var(--wt-orange-400); color: var(--wt-orange-700); background: #FFF7F0; transform: translateY(-1px); }
.wt-adv__chip--sm { padding: .4rem .8rem; font-size: .8rem; }

/* Watily mark (logo bubble) */
.wt-advm { display: block; color: #111827; overflow: visible; }
.wt-advm--sm { width: 40px; height: 32px; }
.wt-advm--md { width: 48px; height: 38px; }
.wt-advm--lg { position: relative; width: 130px; height: 104px; filter: drop-shadow(0 12px 18px rgba(240, 108, 20, .35)); animation: wtAdvFloat 4s ease-in-out infinite; }
@keyframes wtAdvFloat { 50% { transform: translateY(-5px) rotate(-2deg); } }
.wt-advm__dashes path { transform-box: fill-box; transform-origin: left center; }
.wt-adv__welcome .wt-advm__dashes path { animation: wtAdvDashIdle 3.6s ease-in-out infinite; }
.wt-advm__dashes .d2, .wt-advm__dashes .d5 { animation-delay: .25s !important; }
.wt-advm__dashes .d3, .wt-advm__dashes .d6 { animation-delay: .5s !important; }
.wt-advm__dashes .d7 { animation-delay: .75s !important; }
.wt-advm__dashes .d8 { animation-delay: 1s !important; }
@keyframes wtAdvDashIdle { 0%, 70%, 100% { opacity: 1; transform: scaleX(1); } 80% { opacity: .5; transform: scaleX(.5); } }
/* Thinking: dashes "type" in sequence, the bubble breathes */
.wt-adv__frame[data-state="thinking"] .wt-adv__turn:not(.is-static) .wt-adv__a-mark .wt-advm__dashes path,
.wt-adv__frame[data-state="thinking"] .wt-adv__badge .wt-advm__dashes path { animation: wtAdvDashType 1.2s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes wtAdvDashType { 0% { transform: scaleX(0); opacity: 0; } 35% { transform: scaleX(1); opacity: 1; } 75% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(0); opacity: 0; } }
.wt-adv__frame[data-state="thinking"] .wt-adv__a-mark .wt-advm { animation: wtAdvBreath 1.6s ease-in-out infinite; }
@keyframes wtAdvBreath { 50% { transform: scale(1.08); } }
.wt-adv__frame[data-state="answering"] .wt-adv__turn:not(.is-static) .wt-adv__a-mark .wt-advm__dashes path { animation: wtAdvDashIdle 1.4s ease-in-out infinite; }

/* One exchange on stage */
.wt-adv__turn { display: flex; flex-direction: column; gap: 1.1rem; animation: wtAdvEnter .45s cubic-bezier(.2, .8, .2, 1) both; }
.wt-adv__turn.is-leaving { animation: wtAdvLeave .26s ease forwards; }
@keyframes wtAdvEnter { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes wtAdvLeave { to { opacity: 0; transform: translateY(-12px); filter: blur(4px); } }
@keyframes wtAdvIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wt-adv__q { align-self: flex-end; max-width: 85%; display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.wt-adv__q-label { font-size: .72rem; font-weight: 800; color: var(--wt-ink-400); }
.wt-adv__q-text { padding: .7rem 1.05rem; border-radius: 18px; border-end-end-radius: 6px; background: var(--wt-ink-900); color: #fff; font-weight: 600; line-height: 1.65; }

.wt-adv__a { display: flex; flex-direction: column; gap: .8rem; }
.wt-adv__a-head { display: flex; align-items: center; gap: .85rem; min-height: 54px; }
.wt-adv__a-mark { width: 60px; height: 54px; flex: none; border-radius: 16px; display: grid; place-items: center; background: #FFF4EC; border: 1px solid rgba(240, 108, 20, .2); }
.wt-adv__think { display: flex; flex-direction: column; gap: .45rem; min-width: 0; flex: 1; max-width: 280px; transition: opacity .35s, transform .35s; }
.wt-adv__think.is-done { opacity: 0; transform: translateY(-4px); pointer-events: none; height: 0; overflow: hidden; }
.wt-adv__think-text { font-size: .9rem; font-weight: 700; background: linear-gradient(90deg, var(--wt-ink-400) 0%, var(--wt-ink-900) 45%, var(--wt-ink-400) 90%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: wtAdvShimmer 1.6s linear infinite; }
.wt-adv__think-text.is-in { animation: wtAdvShimmer 1.6s linear infinite, wtAdvIn .3s ease both; }
@keyframes wtAdvShimmer { from { background-position: 220% 0; } to { background-position: -220% 0; } }
[dir="rtl"] .wt-adv__think-text { animation-direction: reverse; }
.wt-adv__think-bar { position: relative; height: 3px; border-radius: 3px; background: rgba(240, 108, 20, .12); overflow: hidden; }
.wt-adv__think-bar i { position: absolute; inset-block: 0; width: 40%; border-radius: 3px; background: linear-gradient(90deg, transparent, #F06C14, transparent); animation: wtAdvBar 1.3s ease-in-out infinite; }
@keyframes wtAdvBar { from { inset-inline-start: -40%; } to { inset-inline-start: 100%; } }

.wt-adv__body { display: flex; flex-direction: column; gap: 1.1rem; padding-inline-start: calc(60px + .85rem); }
.wt-adv__text { color: var(--wt-ink-800); font-size: 1.01rem; line-height: 1.9; }
.wt-adv__text p { margin: 0 0 .55rem; }
.wt-adv__text p:last-child { margin-bottom: 0; }
.wt-adv__text strong { color: var(--wt-ink-900); font-weight: 800; }
.wt-adv__text ul { list-style: none; margin: .2rem 0 .6rem; padding: 0; display: flex; flex-direction: column; gap: .3rem; }
.wt-adv__text li { position: relative; padding-inline-start: 1.1rem; }
.wt-adv__text li::before { content: ''; position: absolute; inset-inline-start: 0; top: .78em; width: 6px; height: 6px; border-radius: 50%; background: var(--wt-orange-500); }
.wt-adv__text.is-typing > :last-child::after { content: ''; display: inline-block; width: 2px; height: 1.05em; margin-inline-start: 3px; vertical-align: -.18em; background: var(--wt-orange-500); animation: wtAdvCaret .8s steps(1) infinite; }
@keyframes wtAdvCaret { 50% { opacity: 0; } }

/* Cards */
.wt-adv__cards { display: flex; flex-direction: column; gap: 1.1rem; animation: wtAdvIn .4s ease both; }
.wt-adv__label { margin: 0 0 .55rem; font-size: .74rem; font-weight: 800; letter-spacing: .02em; color: var(--wt-ink-400); }
.wt-adv__apps { display: flex; flex-wrap: wrap; gap: .5rem; }
.wt-adv__app { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .85rem .45rem .5rem; border-radius: 12px; text-decoration: none; color: var(--wt-ink-900); font-size: .88rem; font-weight: 700; background: #fff; border: 1px solid rgba(15, 23, 42, .1); box-shadow: 0 2px 6px -3px rgba(15, 23, 42, .12); animation: wtAdvPop .4s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(var(--i, 0) * 80ms); transition: border-color .2s, transform .2s; }
[dir="rtl"] .wt-adv__app { padding: .45rem .5rem .45rem .85rem; }
.wt-adv__app:hover { border-color: var(--wt-orange-400); transform: translateY(-2px); }
.wt-adv__app-ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: var(--wt-orange-600); background: #FFF4EC; }
.wt-adv__app-ic svg { width: 15px; height: 15px; }
@keyframes wtAdvPop { from { opacity: 0; transform: scale(.9) translateY(6px); } to { opacity: 1; transform: none; } }

.wt-adv__plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.wt-adv__plan { display: flex; flex-direction: column; padding: 1rem 1.05rem; border-radius: 18px; background: #fff; border: 1px solid rgba(15, 23, 42, .1); animation: wtAdvPop .45s cubic-bezier(.2, .9, .3, 1.2) both; }
.wt-adv__plan + .wt-adv__plan { animation-delay: .12s; }
.wt-adv__plan.is-main { border: 1.5px solid var(--wt-orange-400); background: linear-gradient(180deg, #FFF7F0, #fff 60%); box-shadow: 0 18px 36px -22px rgba(240, 108, 20, .65); }
.wt-adv__plan-top { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.wt-adv__plan-badge { font-size: .7rem; font-weight: 800; padding: .2rem .55rem; border-radius: 999px; color: var(--wt-ink-600); background: var(--wt-ink-100); }
.wt-adv__plan.is-main .wt-adv__plan-badge { color: #fff; background: var(--wt-orange-500); }
.wt-adv__plan-tag { font-size: .72rem; color: var(--wt-ink-500); }
.wt-adv__plan-name { margin-top: .55rem; font-size: 1.05rem; font-weight: 800; color: var(--wt-ink-900); }
.wt-adv__plan-price { display: flex; align-items: baseline; gap: .35rem; margin: .1rem 0 .55rem; }
.wt-adv__plan-price b { font-size: 1.6rem; font-weight: 800; color: var(--wt-ink-900); }
.wt-adv__plan-price span { font-size: .78rem; color: var(--wt-ink-500); }
.wt-adv__plan-addon { margin: -.3rem 0 .55rem; font-size: .75rem; font-weight: 700; color: #7C3AED; }
.wt-adv__plan ul { list-style: none; margin: 0 0 .85rem; padding: 0; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.wt-adv__plan li { display: flex; gap: .4rem; align-items: flex-start; font-size: .8rem; line-height: 1.5; color: var(--wt-ink-700); }
.wt-adv__plan li svg { flex: none; width: 14px; height: 14px; margin-top: .18rem; color: #10B981; }
.wt-adv__plan-cta { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .62rem .9rem; border-radius: 12px; font-weight: 800; font-size: .86rem; text-decoration: none; color: var(--wt-ink-800); background: var(--wt-ink-100); transition: transform .2s, box-shadow .2s; }
.wt-adv__plan-cta svg { width: 14px; height: 14px; }
.wt-adv__plan.is-main .wt-adv__plan-cta { color: #fff; background: linear-gradient(135deg, #F06C14, #FA903A); box-shadow: 0 10px 20px -10px rgba(240, 108, 20, .85); }
.wt-adv__plan-cta:hover { transform: translateY(-1px); }
.wt-adv__follow { justify-content: flex-start; }

/* Composer */
.wt-adv__form { display: flex; align-items: flex-end; gap: .5rem; margin: 0 .9rem .9rem; padding: .4rem; padding-inline-start: 1rem; border-radius: 18px; background: var(--wt-ink-50); border: 1.5px solid rgba(15, 23, 42, .1); transition: border-color .2s, box-shadow .2s, background .2s; }
.wt-adv__form:focus-within { background: #fff; border-color: var(--wt-orange-400); box-shadow: 0 0 0 4px rgba(240, 108, 20, .12); }
.wt-adv__input { flex: 1; min-width: 0; border: 0; outline: 0; resize: none; background: transparent; padding: .6rem 0; max-height: 130px; font-size: 1rem; line-height: 1.55; color: var(--wt-ink-900); }
.wt-adv__input::placeholder { color: var(--wt-ink-400); }
.wt-adv__send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 13px; cursor: pointer; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #F06C14, #FA903A); box-shadow: 0 8px 18px -8px rgba(240, 108, 20, .75); transition: transform .15s, opacity .2s; }
.wt-adv__send:hover { transform: translateY(-1px) scale(1.04); }
.wt-adv__send:disabled { opacity: .45; cursor: default; transform: none; }
.wt-adv__note { margin: 1rem 0 0; text-align: center; font-size: .8rem; color: var(--wt-ink-500); }
.wt-adv__note a { color: var(--wt-orange-700); font-weight: 700; text-decoration: none; }

/* Daily limit */
.wt-adv__quota { margin: -.35rem 1rem .8rem; font-size: .76rem; font-weight: 700; color: var(--wt-ink-400); text-align: center; }
.wt-adv__quota[hidden] { display: none; }
.wt-adv__form.is-locked { opacity: .6; }
.wt-adv__limit { padding: 1.1rem 1.2rem; border-radius: 18px; background: linear-gradient(180deg, #FFF7F0, #fff 70%); border: 1.5px solid rgba(240, 108, 20, .3); animation: wtAdvPop .4s cubic-bezier(.2, .9, .3, 1.2) both; }
.wt-adv__limit-title { margin: 0 0 .35rem; font-size: 1rem; font-weight: 800; color: var(--wt-ink-900); }
.wt-adv__limit-text { margin: 0 0 .95rem; font-size: .92rem; line-height: 1.8; color: var(--wt-ink-700); }
.wt-adv__limit-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.wt-adv__limit-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.1rem; border-radius: 13px; font-weight: 800; font-size: .9rem; text-decoration: none; transition: transform .2s; }
.wt-adv__limit-btn svg { width: 18px; height: 18px; }
.wt-adv__limit-btn:hover { transform: translateY(-1px); }
.wt-adv__limit-btn--wa { color: #fff; background: #25D366; }
.wt-adv__limit-btn--book { color: #fff; background: linear-gradient(135deg, #F06C14, #FA903A); }

@media (max-width: 640px) {
    .wt-adv__frame { border-radius: 22px; }
    .wt-adv__frame::before { border-radius: 23.5px; }
    .wt-adv__bar { padding: .7rem .8rem; }
    .wt-adv__tool span { display: none; }
    .wt-adv__stage { min-height: 360px; padding: 1.1rem .95rem; }
    .wt-adv__body { padding-inline-start: 0; }
    .wt-adv__plans { grid-template-columns: 1fr; }
    .wt-adv__q { max-width: 92%; }
    .wt-adv__form { margin: 0 .6rem .6rem; }
    .wt-adv__examples { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .wt-adv *, .wt-adv *::before, .wt-adv *::after { animation: none !important; transition: none !important; }
}
