/* কথক FM 1.10 additions. Uses the theme's colour tokens, so dark and light both work. */

/* bottom sheets: interests */
.kfmx-sheet { position: fixed; inset: 0; z-index: 85; display: flex; align-items: flex-end; justify-content: center; background: rgba(5, 4, 8, 0); transition: background .2s; }
.kfmx-sheet.is-on { background: rgba(5, 4, 8, .62); }
.kfmx-sheet__box { width: 100%; max-width: 560px; max-height: 86vh; overflow: auto; background: var(--surface); color: var(--text); border-radius: 24px 24px 0 0; padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); transition: transform .24s var(--ease, ease-out); }
.kfmx-sheet.is-on .kfmx-sheet__box { transform: none; }
.kfmx-sheet__box h2 { margin: 0 0 4px; }
.kfmx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.kfmx-chip { min-height: 42px; padding: .35em 1em; border-radius: 999px; border: 1.5px solid var(--line-2, var(--line)); background: transparent; color: var(--text); font: inherit; font-size: .95rem; cursor: pointer; }
.kfmx-chip:hover { background: var(--surface-2, rgba(255,255,255,.06)); }
.kfmx-chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.kfmx-chip.is-on::before { content: "✓ "; }
.kfmx-sheet__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.kfmx-sheet__row .kfm-btn[disabled] { opacity: .45; cursor: not-allowed; }
@media (min-width: 700px) { .kfmx-sheet { align-items: center; } .kfmx-sheet__box { border-radius: 24px; } }

/* install banner */
.kfmx-install { position: fixed; z-index: 72; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + var(--player-h) + 12px + env(safe-area-inset-bottom, 0px)); max-width: 460px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 18px; background: var(--surface-2, var(--surface)); border: 1px solid var(--line-2, var(--line)); box-shadow: 0 18px 40px -18px rgba(0,0,0,.8); transform: translateY(20px); opacity: 0; transition: transform .25s, opacity .25s; }
.kfmx-install.is-on { transform: none; opacity: 1; }
.kfmx-install__i { flex: 0 0 40px; height: 40px; border-radius: 11px; background: var(--accent) url("../icon-192.png") center / cover no-repeat; }
.kfmx-install__t { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.kfmx-install__t small { color: var(--muted); }
.kfmx-x { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.kfmx-x:hover { background: var(--line); color: var(--text); }
.kfm-installbtn[hidden] { display: none !important; }

/* what next */
.kfmx-next { position: fixed; inset: 0; z-index: 86; display: flex; align-items: flex-end; justify-content: center; background: rgba(5, 4, 8, 0); transition: background .2s; pointer-events: none; }
.kfmx-next.is-on { background: rgba(5, 4, 8, .55); pointer-events: auto; }
.kfmx-next__box { width: 100%; max-width: 520px; background: var(--surface); border-radius: 24px 24px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); transition: transform .24s var(--ease, ease-out); display: grid; gap: 10px; }
.kfmx-next.is-on .kfmx-next__box { transform: none; }
.kfmx-next__done { margin: 0; color: var(--muted); font-size: .9rem; }
.kfmx-next .kfm-h3 { margin: 0; }
.kfmx-next__main { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; padding: 12px; border-radius: 16px; border: 1.5px solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); font: inherit; cursor: pointer; }
.kfmx-next__main span:last-child { display: grid; gap: 2px; min-width: 0; }
.kfmx-next__main strong { font-size: 1.05rem; }
.kfmx-next__main small { color: var(--muted); }
.kfmx-next__main em { font-style: normal; color: var(--accent); font-weight: 600; font-size: .9rem; }
.kfmx-next__cv { flex: 0 0 64px; height: 64px; border-radius: 10px; background-size: cover; background-position: center; }
.kfmx-next__more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kfmx-next__more button { display: flex; gap: 10px; align-items: center; text-align: left; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; min-width: 0; }
.kfmx-next__more button span:last-child { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.kfmx-next__more .kfmx-next__cv { flex-basis: 44px; height: 44px; border-radius: 8px; }
@media (min-width: 700px) { .kfmx-next { align-items: center; } .kfmx-next__box { border-radius: 24px; } }

/* chapters + bookmarks panel under the player */
.kfmx-panel { display: grid; gap: 18px; margin: 4px 0 26px; }
.kfmx-panel[hidden] { display: none; }
.kfmx-ch ol, .kfmx-marks ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.kfmx-ch button { width: 100%; display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 12px; border: 0; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.kfmx-ch button:hover { background: var(--line); }
.kfmx-ch button.is-now { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text); font-weight: 600; }
.kfmx-ch button.is-now .kfmx-ch__t { color: var(--accent); }
.kfmx-ch__t { flex: 0 0 auto; min-width: 3.4em; font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; }
.kfmx-marks li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.kfmx-marks__t { flex: 0 0 auto; display: grid; justify-items: center; min-width: 4em; padding: 6px 8px; border-radius: 10px; border: 0; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; }
.kfmx-marks__t small { font-weight: 500; font-size: .72rem; color: var(--muted); }
.kfmx-marks__body { flex: 1; min-width: 0; }
.kfmx-marks__body p { margin: 0 0 4px; white-space: pre-wrap; }
.kfmx-marks__body textarea { width: 100%; min-height: 70px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2, var(--line)); background: var(--bg); color: var(--text); font: inherit; resize: vertical; }
.kfmx-marks__act { display: flex; gap: 14px; align-items: center; margin-top: 4px; }

/* challenge card */
.kfmx-chal { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; justify-content: space-between; padding: 18px 20px; border-radius: var(--r, 16px); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface)); border: 1px solid var(--line); }
.kfmx-chal[hidden] { display: none; }
.kfmx-chal__txt { flex: 1 1 260px; min-width: 0; }
.kfmx-chal__txt .kfm-kicker { margin: 0 0 2px; }
.kfmx-chal__txt .kfm-h3 { margin: 0 0 4px; }
.kfmx-chal__txt .kfm-help { margin: 0; }
.kfmx-chal__bar { display: block; margin-top: 8px; max-width: 360px; }
.kfmx-chal__btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* reviews */
.kfm-reviews { display: grid; gap: 16px; margin-top: 14px; }
.kfm-reviews__form { display: grid; gap: 8px; }
.kfm-reviews__label { font-weight: 600; }
.kfm-reviews__form textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2, var(--line)); background: var(--surface); color: var(--text); font: inherit; resize: vertical; }
.kfm-reviews__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.kfm-reviews__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.kfm-reviews__list li { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.kfm-reviews__body { margin: 0 0 6px; }
.kfm-reviews__by { margin: 0; color: var(--muted); font-size: .88rem; }
.kfm-reviews__stars { color: var(--star); letter-spacing: 1px; }

/* checkout gateway picker, gifts */
.kfm-gwpick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.kfm-gwpick label { flex: 1 1 200px; display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line-2, var(--line)); cursor: pointer; }
.kfm-gwpick label.is-on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.kfm-gwbox { border: 0; margin: 0; padding: 0; min-width: 0; }
.kfm-gwbox[hidden] { display: none; }
.kfm-plan__gift { display: block; text-align: center; margin-top: 10px; color: var(--muted); font-size: .9rem; }
.kfm-gift-code strong { letter-spacing: 1px; }

/* "for you" row header link */
.kfmx-foryou-edit { font-size: .9rem; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
	.kfmx-sheet, .kfmx-sheet__box, .kfmx-next, .kfmx-next__box, .kfmx-install { transition: none; }
}

/* install button inside the phone menu (shown only when installing is possible) */
.kfm-nav__install { display: none; }
@media (max-width: 999.98px) {
	.kfm-nav .kfm-nav__install:not([hidden]) { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 22px; padding: 14px; border: 1.5px solid var(--accent); border-radius: 14px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; }
	.kfm-nav .kfm-nav__install:not([hidden]) + .kfm-nav__acct { margin-top: 12px; }
}
.kfm-deck__sample { margin: -4px 0 10px; text-align: center; font-size: .9rem; color: var(--muted); }
.kfm-deck__sample a { color: var(--accent); }
