/* Write a review: two full-screen steps.
 *
 * Step 1 (#shop-review-pick) is a visual product grid; step 2
 * (#shop-review-write) is the product strip, five big stars, the review,
 * and the purchase email, with POST REVIEW in the dock. Same tokens and
 * rhythm as the reviews sheet; own ids keep the blanket "[id*=modal]" and
 * button-safety repaints off, and they sit above the reviews sheet.
 */
html body #shop-review-pick,
html body #shop-review-write {
    --rw-ink: #0d0f0e;
    --rw-body: #6f6f69;
    --rw-mute: #9a9a93;
    --rw-label: #8b8b85;
    --rw-hair: #e6e6e2;
    --rw-rule: #dcdcd6;
    --rw-paper: #ffffff;
    --rw-art: #f3f3f0;
    --rw-placeholder: #b6b6ae;
    --rw-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    flex-direction: column;
    background: var(--rw-paper) !important;
    color: var(--rw-ink) !important;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    color-scheme: light;
}

html body #shop-review-pick *,
html body #shop-review-write * {
    box-sizing: border-box;
}

html body #shop-review-pick .rw-scroll,
html body #shop-review-write .rw-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 40px;
}

/* Bar */
html body #shop-review-pick .rw-bar,
html body #shop-review-write .rw-bar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 20px 12px;
    background: rgba(255, 255, 255, 0.93) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rw-hair);
}

html body #shop-review-pick .rw-bar-lead,
html body #shop-review-write .rw-bar-lead {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

html body #shop-review-pick .rw-back,
html body #shop-review-write .rw-back {
    width: 26px;
    flex: 0 0 26px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 22px;
    line-height: 1;
    color: var(--rw-ink) !important;
    -webkit-text-fill-color: var(--rw-ink) !important;
    cursor: pointer;
}

html body #shop-review-pick .rw-crumb,
html body #shop-review-write .rw-crumb,
html body #shop-review-pick .rw-step,
html body #shop-review-write .rw-step {
    font-family: var(--rw-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--rw-label) !important;
    -webkit-text-fill-color: var(--rw-label) !important;
    white-space: nowrap;
}

/* Intro */
html body #shop-review-pick .rw-intro,
html body #shop-review-write .rw-intro {
    padding: 30px 20px 0;
}

html body #shop-review-pick .rw-kicker,
html body #shop-review-write .rw-kicker {
    font-family: var(--rw-mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    color: var(--rw-label) !important;
    -webkit-text-fill-color: var(--rw-label) !important;
}

html body #shop-review-pick .rw-intro h2,
html body #shop-review-write .rw-intro h2 {
    margin: 12px 0 0;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -0.025em;
    font-weight: 600;
    color: var(--rw-ink) !important;
    -webkit-text-fill-color: var(--rw-ink) !important;
}

html body #shop-review-pick .rw-intro p,
html body #shop-review-write .rw-intro p {
    margin: 12px 0 0;
    max-width: 34ch;
    font-size: 14px;
    line-height: 1.5;
    text-wrap: pretty;
    color: var(--rw-body) !important;
    -webkit-text-fill-color: var(--rw-body) !important;
}

/* Step 1: product grid */
html body #shop-review-pick .rw-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 30px;
    padding: 28px 20px 0;
}

html body #shop-review-pick .rw-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    text-align: left;
    cursor: pointer;
}

html body #shop-review-pick .rw-card-art {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 5;
    background-color: var(--rw-art) !important;
    background-size: cover;
    background-position: center;
}

html body #shop-review-pick .rw-card-mark {
    font-family: var(--rw-mono);
    font-size: 28px;
    color: var(--rw-mute) !important;
    -webkit-text-fill-color: var(--rw-mute) !important;
}

html body #shop-review-pick .rw-card-kind {
    margin-top: 14px;
    font-family: var(--rw-mono);
    font-size: 9.5px;
    letter-spacing: 0.14em;
    color: var(--rw-mute) !important;
    -webkit-text-fill-color: var(--rw-mute) !important;
}

html body #shop-review-pick .rw-card-name {
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
    color: var(--rw-ink) !important;
    -webkit-text-fill-color: var(--rw-ink) !important;
}

html body #shop-review-pick .rw-card-price {
    margin-top: 4px;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    color: var(--rw-body) !important;
    -webkit-text-fill-color: var(--rw-body) !important;
}

html body #shop-review-pick .rw-card-cta {
    display: block;
    margin-top: 12px;
    padding: 12px 0;
    border: 1px solid var(--rw-rule);
    text-align: center;
    font-family: var(--rw-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--rw-ink) !important;
    -webkit-text-fill-color: var(--rw-ink) !important;
}

html body #shop-review-pick .rw-card:active .rw-card-cta {
    background: var(--rw-ink) !important;
    color: var(--rw-paper) !important;
    -webkit-text-fill-color: var(--rw-paper) !important;
}

html body #shop-review-pick .rw-empty {
    padding: 44px 20px;
    text-align: center;
    font-family: var(--rw-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    line-height: 1.7;
    color: var(--rw-mute) !important;
    -webkit-text-fill-color: var(--rw-mute) !important;
}

/* Step 2: product strip */
html body #shop-review-write .rw-product {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 20px 0;
    padding: 14px 0;
    border-top: 1px solid var(--rw-hair);
    border-bottom: 1px solid var(--rw-hair);
}

html body #shop-review-write .rw-product-art {
    flex: 0 0 64px;
    width: 64px;
    height: 80px;
    background-color: var(--rw-art) !important;
    background-size: cover;
    background-position: center;
}

html body #shop-review-write .rw-product-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

html body #shop-review-write .rw-product-kind {
    font-family: var(--rw-mono);
    font-size: 9.5px;
    letter-spacing: 0.14em;
    color: var(--rw-mute) !important;
    -webkit-text-fill-color: var(--rw-mute) !important;
}

html body #shop-review-write .rw-product-name {
    margin-top: 5px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--rw-ink) !important;
    -webkit-text-fill-color: var(--rw-ink) !important;
}

html body #shop-review-write .rw-product-price {
    margin-top: 4px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--rw-body) !important;
    -webkit-text-fill-color: var(--rw-body) !important;
}

/* Sections */
html body #shop-review-write .rw-section {
    padding: 0 20px;
    margin-top: 30px;
}

html body #shop-review-write .rw-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--rw-ink);
    font-family: var(--rw-mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    color: var(--rw-ink) !important;
    -webkit-text-fill-color: var(--rw-ink) !important;
}

html body #shop-review-write .rw-head span:last-child {
    letter-spacing: 0.12em;
    color: var(--rw-mute) !important;
    -webkit-text-fill-color: var(--rw-mute) !important;
}

/* Stars: big, black when active */
html body #shop-review-write .rw-stars {
    display: flex;
    gap: 6px;
    padding: 18px 0 4px;
}

html body #shop-review-write .rw-star-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    cursor: pointer;
}

html body #shop-review-write .rw-star-btn .rv-star {
    display: block;
    width: 34px;
    height: 34px;
    background: var(--rw-rule) !important;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    transition: transform 120ms ease;
}

html body #shop-review-write .rw-star-btn.is-active .rv-star {
    background: var(--rw-ink) !important;
}

html body #shop-review-write .rw-star-btn:active .rv-star {
    transform: scale(0.92);
}

/* Review text + fields */
html body #shop-review-write .rw-text,
html body #shop-review-write textarea#mobile-shop-review-text {
    display: block;
    width: 100%;
    min-height: 150px;
    margin-top: 14px;
    padding: 16px 18px !important;
    border: 1px solid var(--rw-rule) !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    outline: none;
    resize: vertical;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--rw-ink) !important;
    -webkit-text-fill-color: var(--rw-ink) !important;
    caret-color: var(--rw-ink);
    -webkit-appearance: none;
    appearance: none;
}

html body #shop-review-write .rw-text::placeholder,
html body #shop-review-write .rw-field input::placeholder {
    color: var(--rw-placeholder) !important;
    -webkit-text-fill-color: var(--rw-placeholder) !important;
    opacity: 1;
}

html body #shop-review-write .rw-field input:focus,
html body #shop-review-write input#mobile-shop-review-email:focus,
html body #shop-review-write input#mobile-shop-review-order:focus {
    border-color: var(--rw-ink) !important;
}

html body #shop-review-write .rw-text:focus,
html body #shop-review-write textarea#mobile-shop-review-text:focus {
    border-color: var(--rw-ink) !important;
}

html body #shop-review-write .rw-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 18px;
}

html body #shop-review-write .rw-field label {
    display: block;
    font-family: var(--rw-mono);
    font-size: 9.5px;
    letter-spacing: 0.14em;
    color: var(--rw-mute) !important;
    -webkit-text-fill-color: var(--rw-mute) !important;
}

html body #shop-review-write .rw-field input,
html body #shop-review-write input#mobile-shop-review-email,
html body #shop-review-write input#mobile-shop-review-order {
    display: block;
    width: 100%;
    min-height: 50px;
    margin: 8px 0 0;
    padding: 13px 16px 14px !important;
    border: 1px solid var(--rw-rule) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    outline: none;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: var(--rw-ink) !important;
    -webkit-text-fill-color: var(--rw-ink) !important;
    caret-color: var(--rw-ink);
    -webkit-appearance: none;
    appearance: none;
}

html body #shop-review-write .rw-fine {
    margin-top: 34px;
    padding: 22px 20px 0;
    border-top: 1px solid var(--rw-hair);
    font-family: var(--rw-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    line-height: 1.7;
    color: var(--rw-mute) !important;
    -webkit-text-fill-color: var(--rw-mute) !important;
}

/* Dock */
html body #shop-review-write .rw-dock {
    flex: 0 0 auto;
    padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--rw-rule);
}

html body #shop-review-write .rw-dock-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

html body #shop-review-write .rw-dock-line span {
    font-family: var(--rw-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    color: var(--rw-label) !important;
    -webkit-text-fill-color: var(--rw-label) !important;
}

html body #shop-review-write .rw-dock-line strong {
    min-width: 0;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--rw-ink) !important;
    -webkit-text-fill-color: var(--rw-ink) !important;
}

html body #shop-review-write .rw-cta {
    margin-top: 16px;
    width: 100%;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--rw-ink) !important;
    box-shadow: none !important;
    font-family: var(--rw-mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    color: var(--rw-paper) !important;
    -webkit-text-fill-color: var(--rw-paper) !important;
    cursor: pointer;
}

html body #shop-review-write .rw-cta:disabled {
    background: var(--rw-rule) !important;
    color: var(--rw-mute) !important;
    -webkit-text-fill-color: var(--rw-mute) !important;
}

/* The server's answer, on the sheet (the app's toast helper is a no-op). */
html body #shop-review-write .rw-status {
    margin-top: 12px;
    font-family: var(--rw-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    line-height: 1.6;
    color: #c4444c !important;
    -webkit-text-fill-color: #c4444c !important;
}

html body #shop-review-write .rw-status[hidden] {
    display: none;
}
