/*
 * The website's "Give a review" form (task 763).
 *
 * Loaded by reviews.blade.php only, before the design system
 * (gotaxi-site.css), and written against its tokens: the brand colour, its
 * ink, soft tint and deep text shade come from layout/theme-vars, so every
 * brand draws the form in its own colours. Two columns from 992px (the
 * form, then the "what happens next" panel), one under it. Nothing here
 * uses a light-red tint: an error is red text on a hairline, as the
 * field-errors helper draws it.
 */

/* ------------------------------------------------------------------ */
/* Layout                                                               */
/* ------------------------------------------------------------------ */

.gt-rvf-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--gt-s6);
    align-items: start;
}
@media (min-width: 992px) {
    .gt-rvf-grid { grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: var(--gt-s8); }
    .gt-rvf-aside { position: sticky; top: calc(var(--gt-header-h) + var(--gt-s5)); }
}

.gt-rvf-card { padding: clamp(22px, 3.5vw, 40px); box-shadow: var(--gt-sh-2); }
.gt-rvf-head { display: grid; gap: var(--gt-s2); margin-bottom: var(--gt-s6); }
.gt-rvf-head .gt-h3 { margin: 0; letter-spacing: -.015em; }
.gt-rvf-head .gt-muted { margin: 0; font-size: var(--gt-fs-md); }
.gt-rvf-form { display: grid; gap: var(--gt-s5); }
.gt-rvf-opt { font-weight: 400; }

/* The label and its live counter on one line */
.gt-rvf-labelrow { display: flex; align-items: baseline; justify-content: space-between; gap: var(--gt-s3); }
.gt-rvf-count {
    font-size: var(--gt-fs-xs); color: var(--gt-faint); font-variant-numeric: tabular-nums; white-space: nowrap;
    transition: color var(--gt-t-fast) var(--gt-ease);
}
.gt-rvf-count.is-full { color: var(--gt-danger); }

/* The review box grows with its text (review-form.js, up to 8 lines), then scrolls. */
/* Scoped under the section: gotaxi-site.css loads after this sheet and sets .gt-textarea's own resize and min-height. */
.gt-rvf .gt-rvf-textarea { min-height: 0; resize: none; overflow-y: hidden; line-height: 1.55; }
.gt-rvf .gt-rvf-textarea.is-max { overflow-y: auto; }

/* ------------------------------------------------------------------ */
/* Star rating: five radios, drawn as stars, keyboard first              */
/* ------------------------------------------------------------------ */

.gt-rvf-rating { margin: 0; padding: 0; border: 0; min-width: 0; }
.gt-rvf-rating legend { padding: 0; margin-bottom: 6px; }
.gt-rvf-rate-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gt-s2) var(--gt-s4); }
.gt-rate { display: inline-flex; gap: 2px; margin-inline-start: -4px; }
.gt-rate-star {
    display: inline-grid; place-content: center; width: 44px; height: 44px; margin: 0;
    border-radius: var(--gt-r-sm); color: var(--gt-line-2); cursor: pointer;
    transition: color var(--gt-t-fast) var(--gt-ease), transform var(--gt-t-fast) var(--gt-ease), background var(--gt-t-fast) var(--gt-ease);
}
.gt-rate-star svg { display: block; }
.gt-rate-star:hover { transform: scale(1.08); }
.gt-rate-star.is-on { color: var(--gt-accent); }
/* The browser alone (no script): the stars up to the chosen one, and hover previews. */
.gt-rate:has(input:checked) .gt-rate-star { color: var(--gt-line-2); }
.gt-rate:has(#rv-rate-1:checked) .gt-rate-star:nth-of-type(-n+1),
.gt-rate:has(#rv-rate-2:checked) .gt-rate-star:nth-of-type(-n+2),
.gt-rate:has(#rv-rate-3:checked) .gt-rate-star:nth-of-type(-n+3),
.gt-rate:has(#rv-rate-4:checked) .gt-rate-star:nth-of-type(-n+4),
.gt-rate:has(#rv-rate-5:checked) .gt-rate-star:nth-of-type(-n+5) { color: var(--gt-accent); }
.gt-rate:has(.gt-rate-star:hover) .gt-rate-star { color: var(--gt-line-2); }
.gt-rate .gt-rate-star:has(~ .gt-rate-star:hover), .gt-rate .gt-rate-star:hover { color: var(--gt-accent); }
.gt-rate input:focus-visible + .gt-rate-star { outline: 2px solid var(--gt-accent-deep); outline-offset: 1px; background: var(--gt-accent-soft); }
.gt-rvf-rate-text { min-width: 9ch; }
.gt-rvf-rate-text.is-set { color: var(--gt-text); font-weight: 500; }

/* ------------------------------------------------------------------ */
/* Photo picker                                                          */
/* ------------------------------------------------------------------ */

.gt-rvf-photo {
    display: flex; align-items: center; gap: var(--gt-s4);
    padding: var(--gt-s3) var(--gt-s4);
    border: 1px dashed var(--gt-line-2); border-radius: var(--gt-r-md); background: var(--gt-bg);
    transition: border-color var(--gt-t-fast) var(--gt-ease), background var(--gt-t-fast) var(--gt-ease);
}
.gt-rvf-photo.is-over { border-color: var(--gt-accent); border-style: solid; background: var(--gt-accent-soft); }
.gt-rvf-photo.has-photo { border-style: solid; }
.gt-rvf-photo-preview {
    position: relative; flex: 0 0 auto; display: grid; place-content: center; overflow: hidden;
    width: 56px; height: 56px; border-radius: 50%; background: var(--gt-bg-3); color: var(--gt-muted);
}
.gt-rvf-photo-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gt-rvf-photo-preview img[hidden] { display: none; }
.gt-rvf-photo-body { display: grid; gap: 6px; min-width: 0; flex: 1 1 auto; }
.gt-rvf-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gt-s2) var(--gt-s3); min-width: 0; }
.gt-rvf-photo-actions [hidden] { display: none; }
.gt-rvf-photo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
/* Until the script runs, the browser's own file box; with it, the buttons. */
.gt-rvf-file { font-size: var(--gt-fs-sm); color: var(--gt-text-2); max-width: 100%; }
.gt-rvf-photo.is-enhanced .gt-rvf-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.gt-rvf-photo-field { position: relative; }

/* ------------------------------------------------------------------ */
/* Submit, errors, success                                               */
/* ------------------------------------------------------------------ */

.gt-rvf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gt-s3) var(--gt-s4); margin-top: var(--gt-s1); }
.gt-rvf-submit { min-width: 200px; }
@media (max-width: 599px) { .gt-rvf-submit { width: 100%; } }
.gt-rvf-submit.is-loading { opacity: .85; }

.gt-rvf-errors {
    margin-bottom: var(--gt-s5); padding: var(--gt-s3) var(--gt-s4);
    border: 1px solid var(--gt-danger); border-inline-start-width: 4px; border-radius: var(--gt-r-md);
    background: var(--gt-bg); color: var(--gt-text); font-size: var(--gt-fs-sm);
}
.gt-rvf .gt-rvf-errors:focus, .gt-rvf .gt-rvf-errors:focus-visible { outline: 2px solid var(--gt-danger); outline-offset: 2px; box-shadow: none; }
.gt-rvf-errors strong { display: block; color: var(--gt-danger); font-weight: 600; margin-bottom: 4px; }
.gt-rvf-errors ul { margin: 0; padding-inline-start: 1.2em; }
.gt-rvf-errors a { color: var(--gt-danger); text-decoration: underline; text-underline-offset: 3px; }
.gt-rvf-form .gt-input[aria-invalid="true"], .gt-rvf-form .gt-textarea[aria-invalid="true"] { border-color: var(--gt-danger); }

.gt-rvf-success { display: grid; justify-items: start; gap: var(--gt-s3); padding-block: var(--gt-s4); }
.gt-rvf-success-icon {
    display: grid; place-content: center; width: 56px; height: 56px; border-radius: 50%;
    background: var(--gt-accent); color: var(--gt-accent-ink); margin-bottom: var(--gt-s1);
}
.gt-rvf-success .gt-h3 { margin: 0; }
.gt-rvf-success-text { margin: 0; color: var(--gt-text-2); font-size: var(--gt-fs-md); max-width: 46ch; }
.gt-rvf-success .gt-btn { margin-top: var(--gt-s2); }

/* ------------------------------------------------------------------ */
/* The panel beside the form                                             */
/* ------------------------------------------------------------------ */

.gt-rvf-why { display: grid; gap: var(--gt-s4); }
.gt-rvf-points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gt-s3); }
.gt-rvf-points li { display: flex; align-items: flex-start; gap: var(--gt-s3); color: var(--gt-text-2); font-size: var(--gt-fs-md); line-height: 1.45; }
.gt-rvf-point-icon {
    flex: 0 0 auto; display: grid; place-content: center; width: 30px; height: 30px; border-radius: 50%;
    background: var(--gt-accent-soft); color: var(--gt-accent-deep); margin-top: -2px;
}
.gt-rvf-avg { display: grid; gap: 2px; padding-top: var(--gt-s4); border-top: 1px solid var(--gt-line); }
.gt-rvf-avg-label { font-size: var(--gt-fs-xs); color: var(--gt-muted); }
.gt-rvf-avg-row { display: flex; align-items: center; gap: var(--gt-s3); }
.gt-rvf-avg-num { font-size: var(--gt-fs-2xl); font-weight: 500; color: var(--gt-ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.gt-rvf-avg .gt-stars { font-size: 16px; }
.gt-rvf-aside .gt-rv-google { margin-top: var(--gt-s4); }

/* Off-screen honeypot: present for a robot, invisible and untabbable for a person. */
.gt-rvf-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
    .gt-rate-star, .gt-rvf-count, .gt-rvf-photo { transition: none; }
    .gt-rate-star:hover { transform: none; }
}
