/*
 * Feedback mode (services/feedback.php). Plain CSS on purpose, outside the
 * SCSS bundle: it ships only while the mode is on and must not cost a
 * customer a byte. Everything is prefixed fbk- and states its own font, size
 * and colours, so the site's styles neither reach it nor are reached by it.
 */

.fbk-ui, .fbk-ui * { box-sizing: border-box; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: normal; text-transform: none; }

:root { --fbk: #ff5a36; --fbk-ink: #1d1b2e; --fbk-muted: #6b6880; --fbk-line: #e6e4ee; }

/* the layer the pins and areas are drawn in: page coordinates, so they scroll with it */
.fbk-layer { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 2147483000; pointer-events: none; }

.fbk-pin { position: absolute; pointer-events: auto; transform: translate(-50%, -100%); min-width: 28px; height: 28px; padding: 0 7px; border: 2px solid #fff; border-radius: 14px 14px 14px 3px; background: var(--fbk); color: #fff; font: 700 13px/24px system-ui, sans-serif; text-align: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.28); transition: transform .12s; }
.fbk-pin:hover, .fbk-pin.is-open { transform: translate(-50%, -100%) scale(1.15); }
.fbk-pin.is-done { background: #9a98a8; }
.fbk-pin.is-lost { border-style: dashed; }
.fbk-pin.is-ghost { background: var(--fbk-ink); pointer-events: none; }

.fbk-area { position: absolute; border: 2px solid var(--fbk); background: rgba(255,90,54,.08); border-radius: 4px; pointer-events: none; }
.fbk-area.is-done { border-color: #9a98a8; background: rgba(154,152,168,.08); }
.fbk-area.is-lost, .fbk-area.is-ghost { border-style: dashed; }

/* picking */
html.fbk-picking, html.fbk-picking * { cursor: crosshair !important; }
html.fbk-dragging body { touch-action: none; user-select: none; -webkit-user-select: none; }
.fbk-hover { position: fixed; display: none; z-index: 2147482999; pointer-events: none; outline: 2px solid var(--fbk); outline-offset: 1px; background: rgba(255,90,54,.06); border-radius: 3px; }
.fbk-hover::after { content: attr(data-tag); position: absolute; left: -2px; top: -22px; padding: 2px 6px; border-radius: 4px; background: var(--fbk); color: #fff; font: 600 11px/16px ui-monospace, Menlo, monospace; white-space: nowrap; }
.fbk-drag { position: fixed; display: none; z-index: 2147483001; pointer-events: none; border: 2px dashed var(--fbk); background: rgba(255,90,54,.1); }
.fbk-hint { position: fixed; display: none; left: 50%; top: 14px; transform: translateX(-50%); z-index: 2147483002; padding: 8px 14px; border-radius: 999px; background: var(--fbk-ink); color: #fff; font-size: 13px; box-shadow: 0 4px 16px rgba(0,0,0,.25); pointer-events: none; white-space: nowrap; }

/* the toolbar, at the right edge where no band or the phone bar sits */
.fbk-bar { position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 2147483002; display: flex; flex-direction: column; gap: 6px; padding: 8px 6px; border-radius: 14px; background: #fff; box-shadow: 0 6px 24px rgba(29,27,46,.22); }
.fbk-bar-label { font-size: 9px; font-weight: 700; text-transform: uppercase !important; letter-spacing: .06em !important; color: var(--fbk); text-align: center; writing-mode: vertical-rl; transform: rotate(180deg); margin: 0 auto 2px; }
.fbk-btn { width: 36px; height: 36px; border: 0; border-radius: 10px; background: #f4f3f8; color: var(--fbk-ink); font-size: 17px; line-height: 36px; padding: 0; cursor: pointer; }
.fbk-btn:hover { background: #ebe9f3; }
.fbk-btn.is-on { background: var(--fbk); color: #fff; }
.fbk-btn.is-off { opacity: .4; }
.fbk-count { font-size: 14px; font-weight: 700; background: var(--fbk-ink); color: #fff; }
.fbk-count:hover { background: #34314d; }

/* the comment form and the thread */
.fbk-pop { position: absolute; display: none; z-index: 2147483003; width: 300px; max-width: calc(100vw - 16px); padding: 12px; border-radius: 12px; background: #fff; color: var(--fbk-ink); font-size: 14px; line-height: 1.4; box-shadow: 0 10px 34px rgba(29,27,46,.28); text-align: left; }
.fbk-pop-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--fbk-muted); margin-bottom: 6px; }
.fbk-pop-head > span { margin-right: auto; }
.fbk-where { font-size: 12px; color: var(--fbk-muted); margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbk-done-note { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: #9a98a8; border-radius: 4px; padding: 1px 6px; margin-bottom: 6px; }
.fbk-entry { padding: 8px 0; border-top: 1px solid var(--fbk-line); }
.fbk-pop-head + .fbk-entry, .fbk-done-note + .fbk-entry { border-top: 0; padding-top: 2px; }
.fbk-who { font-size: 12px; color: var(--fbk-muted); margin-bottom: 2px; }
.fbk-who strong { color: var(--fbk-ink); }
.fbk-text { white-space: pre-wrap; overflow-wrap: anywhere; }

.fbk-form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.fbk-form textarea, .fbk-form input { width: 100%; margin: 0; padding: 8px 10px; border: 1px solid var(--fbk-line); border-radius: 8px; background: #fff; color: var(--fbk-ink); font-size: 14px; line-height: 1.35; resize: vertical; box-shadow: none; height: auto; }
.fbk-form textarea:focus, .fbk-form input:focus { outline: 2px solid var(--fbk); outline-offset: -1px; border-color: transparent; }
.fbk-row { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.fbk-primary { border: 0; border-radius: 8px; padding: 7px 14px; background: var(--fbk); color: #fff; font-size: 13px; font-weight: 700; line-height: 1.2; cursor: pointer; }
.fbk-primary:disabled { opacity: .5; cursor: default; }
.fbk-link { border: 0; background: none; padding: 2px 4px; color: var(--fbk-muted); font-size: 12px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.fbk-link:hover { color: var(--fbk-ink); }
.fbk-x { font-size: 18px; line-height: 1; }
.fbk-error { color: #c62828; font-size: 12px; }
.fbk-error:empty { display: none; }

/* the list */
.fbk-panel { position: fixed; right: 64px; top: 50%; transform: translateY(-50%); z-index: 2147483002; display: none; width: 320px; max-width: calc(100vw - 80px); max-height: 80vh; overflow: auto; padding: 12px; border-radius: 14px; background: #fff; color: var(--fbk-ink); font-size: 14px; box-shadow: 0 10px 34px rgba(29,27,46,.25); text-align: left; }
.fbk-panel.is-open { display: block; }
.fbk-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.fbk-opt { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--fbk-muted); margin-bottom: 8px; cursor: pointer; }
.fbk-opt input { margin: 0; }
.fbk-empty { color: var(--fbk-muted); font-size: 13px; margin: 8px 0; }
.fbk-item { display: flex; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: none; color: inherit; text-align: left; cursor: pointer; font-size: 13px; line-height: 1.35; }
.fbk-item:hover { background: #f4f3f8; }
.fbk-item.is-done { opacity: .55; }
.fbk-num { flex: none; width: 22px; height: 22px; border-radius: 11px; background: var(--fbk); color: #fff; font-size: 11px; font-weight: 700; line-height: 22px; text-align: center; }
.fbk-item.is-done .fbk-num { background: #9a98a8; }
.fbk-item-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fbk-item-body em { font-style: normal; font-size: 11px; color: var(--fbk-muted); }
.fbk-panel-foot { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--fbk-line); font-size: 12px; }
.fbk-panel-foot a { color: var(--fbk); font-weight: 600; }

@media print { .fbk-ui { display: none !important; } }
