/* IMECA3D — Feedback tab on the design tools. Script: src/js/tool-feedback.js */
.tf-tab { position: fixed; right: 0; top: 50%; z-index: 960; display: flex; align-items: center; gap: 8px;
  padding: 12px 9px; border: 0; border-radius: 10px 0 0 10px; background: var(--accent); color: #fff; cursor: pointer;
  writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg); font: 600 0.86rem var(--font-body); letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(11,27,46,0.25); }
.tf-tab:hover { background: #A63A0A; }
.tf-tab:focus-visible { outline: 3px solid var(--dark); outline-offset: 2px; }
.tf-tab svg { width: 18px; height: 18px; transform: rotate(90deg); }
.tf--open .tf-tab { background: var(--dark); }

.tf-panel { position: fixed; right: 52px; top: 50%; transform: translateY(-50%); z-index: 961; width: min(380px, calc(100vw - 72px));
  max-height: calc(100vh - var(--nav-h) - 40px); overflow-y: auto; padding: 22px; border-radius: 16px; background: #fff;
  border: 1px solid var(--border); box-shadow: 0 18px 50px rgba(11,27,46,0.25); }
.tf-panel[hidden] { display: none; }
.tf-panel h2 { margin: 0 28px 6px 0; font-family: var(--font-head); font-size: 1.15rem; color: var(--text); }
.tf-intro { margin-bottom: 14px; font-size: 0.88rem; color: var(--text-2); line-height: 1.5; }
.tf-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--light);
  font-size: 1.3rem; line-height: 1; color: var(--text-2); cursor: pointer; }
.tf-close:hover { background: var(--light-2); }
.tf-form label, .tf-form legend { display: block; margin: 12px 0 6px; font-size: 0.84rem; font-weight: 600; color: var(--text-2); }
.tf-form textarea, .tf-form select, .tf-form input[type="email"] { width: 100%; padding: 9px 11px; border: 1.5px solid var(--border); border-radius: 10px;
  font: inherit; font-size: 0.92rem; color: var(--text); background: #fff; }
.tf-form textarea:focus, .tf-form select:focus, .tf-form input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(194,65,12,0.15); }
.tf-form textarea { resize: vertical; min-height: 84px; }
.tf-form fieldset { border: 0; padding: 0; margin: 0; }
.tf-form legend { margin-top: 0; }

/* star rating: the inputs are in reverse order so "this and all before it" can be coloured with ~ */
.tf-stars__row { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.tf-stars__row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tf-stars__row label { margin: 0; padding: 2px; font-size: 1.7rem; line-height: 1; color: var(--light-2); cursor: pointer; transition: color 0.15s; }
.tf-stars__row label:hover, .tf-stars__row label:hover ~ label,
.tf-stars__row input:checked ~ label { color: #F59E0B; }
.tf-stars__row input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 4px; }
.tf-stars__hint { margin-left: 8px; font-size: 0.8rem; color: var(--text-3); }

.tf-form .tf-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 0.82rem; line-height: 1.4; }
.tf-check input { margin-top: 2px; accent-color: var(--accent); }
.tf-privacy { margin: 10px 0 12px; font-size: 0.78rem; color: var(--text-3); line-height: 1.45; }
.tf-form .btn { width: 100%; }
.tf-status { margin-top: 10px; font-size: 0.86rem; color: var(--text-2); }
.tf-status--ok { color: #15803D; font-weight: 600; }
.tf-status--err { color: #B91C1C; }
.tf-status a { color: inherit; }

@media (max-width: 640px) {
  .tf-tab { padding: 10px 7px; font-size: 0.78rem; top: auto; bottom: 120px; transform: rotate(180deg); }
  .tf-panel { right: 8px; left: 8px; width: auto; top: auto; bottom: 12px; transform: none; max-height: calc(100vh - var(--nav-h) - 24px); }
}
@media print { .tf { display: none; } }
