/* Rating a bowl: the station card and "Ohodnotit dýmku" */

/* The smoke's name sits right above its coals (h1 or the summary), so the picker keeps it for screen readers only. */
.rate-primary .coal-input__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.rate-strength { padding: var(--space-3) var(--space-4) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--bg-raised); }
.rate-recipe { margin-top: calc(var(--space-2) * -1); }
.rate-parts summary { font-weight: 700; min-height: 52px; }
.rate-parts .coal-input { background: var(--bg-sunken); }

.rate-summary {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--bg-raised);
}
.rate-summary__text { flex: 1; min-width: 0; }
.rate-summary .bowl-card__smoke { overflow-wrap: anywhere; }

.stack > .rate-tabs { display: grid; align-self: stretch; width: 100%; }
.rate-tabs button { padding: 0 var(--space-2); white-space: nowrap; }

.rate-list { max-height: min(58vh, 520px); overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; scrollbar-gutter: stable; }
.rate-list__group {
    padding: var(--space-3) var(--space-3) var(--space-1);
    font-size: var(--step--1);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
}
.rate-list__pic { --tile: 44px; padding: 3px; }
.rate-list__picwrap { position: relative; flex: none; }
/* A club mix in the list: its lit coal on the tins. */
.rate-list__club { position: absolute; left: -6px; top: -6px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-raised); box-shadow: 0 0 0 1.5px var(--accent), 0 0 10px -3px var(--glow); }
.rate-list__club .coal { --size: 14px; }
.rate-list__picwrap .mine-badge { right: -8px; bottom: -6px; height: 20px; min-width: 20px; font-size: 11px; }
.rate-list__picwrap .mine-badge__coal { width: 12px; height: 12px; }
.rate-part { display: grid; gap: var(--space-2); }
.rate-list__text { display: grid; flex: 1; gap: 2px; min-width: 0; padding: var(--space-2) 0; }
.rate-list__text b { font-weight: 700; overflow-wrap: anywhere; }
.rate-list__text small { color: var(--text-3); font-size: var(--step--1); overflow-wrap: anywhere; }
.rate-list button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-2); }
.rate-list button[aria-pressed]::after {
    content: "";
    flex: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--line-strong);
    border-radius: 6px;
}
.rate-list button[aria-pressed="true"]::after {
    border-color: var(--accent);
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.rate-list__empty { padding: var(--space-4); text-align: center; }

.rate-own__bar {
    position: sticky;
    /* Clear of the fixed bottom tab bar (about 68px), which steps aside on desktop; docked while typing (data-kb). */
    bottom: calc(80px + var(--safe-bottom, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-l);
    background: var(--bg-raised);
    box-shadow: var(--shadow-2, var(--shadow-1));
}
@media (min-width: 900px) { .rate-own__bar { bottom: var(--space-3); } }
.rate-own__bar > span { min-width: 0; overflow-wrap: anywhere; }
.rate-own__bar .btn { flex: none; }
.rate-own__bar { flex-wrap: wrap; }
.rate-own__bar > span { flex: 1 0 100%; }
.rate-own__public { flex: none; font-size: var(--step--1); font-weight: 700; }
.rate-own__public + .btn { margin-left: auto; }
.my-mix { display: grid; gap: var(--space-2); min-width: 0; }
.mix-mine__who { display: inline-flex; align-items: center; gap: 6px; }

.rate-extras summary { font-weight: 700; }

/* "Poměr": the shares of an own mix, a bar and a stepper per tobacco, inside the sticky bar */
.rate-ratio { flex: 1 0 100%; display: grid; gap: var(--space-2); max-height: 40vh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.rate-ratio .mix-bar__track { display: flex; gap: 2px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.rate-ratio__rows { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.rate-ratio__row { display: grid; grid-template-columns: minmax(0, 1fr) auto 3.2em auto; align-items: center; gap: var(--space-2); }
.rate-ratio__name { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--step--1); font-weight: 700; }
.rate-ratio__name i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: oklch(0.68 0.13 var(--hue)); }
.rate-ratio__value { text-align: center; }
.rate-ratio__step { width: 40px; min-width: 40px; height: 40px; min-height: 40px; }
.rate-ratio__row--removable { grid-template-columns: minmax(0, 1fr) auto 3.2em auto auto; }
@media (max-width: 419px) {
    .rate-own__bar { gap: var(--space-2) var(--space-4); }
    .rate-own__bar > .btn { flex: 1 0 100%; }
    .rate-own__public + .btn { margin-left: 0; }
}

/* "+1": the guest's own bowls of it, one tap adds the next */
.my-rating__since { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.my-rating__since .rate-before { margin: 0; }
.again { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.again__count { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.again__count .icon { width: 16px; height: 16px; color: var(--accent-2); }
.again__count b { font-family: var(--font-display); font-weight: var(--display-weight); }
.again__btn { gap: 6px; padding-inline: var(--space-3); white-space: nowrap; }
.again__btn .icon { width: 16px; height: 16px; color: var(--accent-2); }

/* The maker names their own mix */
.mix-name { display: flex; gap: var(--space-2); }
.mix-name .input { flex: 1 1 auto; min-width: 0; }
.mix-name .btn { flex: none; }

/* "Na co to chutná?": the blind taste grid, one tinted button per taste family; a used one shows its tastes */
.blind-guess, .blind-result { display: grid; gap: var(--space-3); }
.blind-guess { container-type: inline-size; }
.blind-guess__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.blind-guess__heading { display: grid; gap: 2px; min-width: 0; }
.blind-guess__title { display: flex; align-items: center; gap: 6px; margin: 0; font-size: var(--step-0); }
.blind-guess__title .icon { color: var(--accent-2); }
.blind-guess__count { flex: none; }
.blind-guess.is-full .blind-guess__count { --chip-fg: var(--accent-2); }
.blind-guess__status { margin: 0; min-height: 1.4em; }
.blind-guess__status[data-state="full"] { color: var(--accent-2); }
.blind-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
@container (min-width: 480px) { .blind-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (min-width: 760px) { .blind-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.blind-grid__option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    min-height: 60px;
    padding: 8px 8px 7px;
    border: 1px solid color-mix(in oklab, var(--tone) 38%, transparent);
    border-radius: var(--radius-s);
    background: color-mix(in oklab, var(--tone) 12%, var(--bg-raised));
    color: var(--text);
    font: inherit;
    font-size: var(--step--1);
    font-weight: 700;
    line-height: 1.15;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}
.blind-grid__option:active { transform: scale(0.97); }
.blind-grid__option:focus-visible { outline: 2px solid var(--tone); outline-offset: 2px; }
.blind-grid__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px color-mix(in oklab, var(--tone) 22%, transparent); }
.blind-grid__label { overflow-wrap: break-word; hyphens: manual; }
.blind-grid__check { position: absolute; top: 6px; right: 6px; width: 16px; height: 16px; opacity: 0; color: var(--tone-ink); transition: opacity 0.15s; }
.blind-grid__option.is-used { border-color: var(--tone); background: color-mix(in oklab, var(--tone) 42%, var(--bg-raised)); }
.blind-grid__option.is-used .blind-grid__check { opacity: 1; }
.blind-guess.is-full .blind-grid__option:not(.is-used) { opacity: 0.55; }
.blind-grid__option.is-refused { animation: refuse 0.35s; }
@keyframes refuse { 20%, 60% { translate: -4px 0; } 40%, 80% { translate: 4px 0; } }
@media (prefers-reduced-motion: reduce) { .blind-grid__option.is-refused { animation: none; } }
.blind-result__eyebrow { margin: 0; }
