/*
 * InkArtists support: writing to the shop.
 * Served as-is (no build step); every rule is scoped under .su.
 * One shop with the other pages: the ink front window and Fraunces headline,
 * the form on the shared paper card, the tickets as cards with a status
 * stamp, and the thread with the shop's replies on ink and yours on paper.
 * The admin's tools on a ticket keep their own small controls inside cards.
 * Brand: ink #1C1712, paper #F7F3EC, ember #D65A31.
 */

.su {
    --ink: #1C1712;
    --ink-2: #2A221B;
    --paper: #F7F3EC;
    --paper-2: #EFE6D8;
    --card: #FFFDF8;
    --line: #E6DFD3;
    --soft: #6B5F53;
    --ember: #D65A31;
    --ember-ui: #C24E26;
    --ember-deep: #A83E1E;
    --ember-tint: #FFE4D9;
    --ember-glow: #FF9B72;
    --green: #1F6B47;
    --green-tint: #E3F4EA;
    --amber: #8A5208;
    --amber-tint: #FFF1D2;
    --on-ink-soft: #CDBFAE;
    --display: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: Satoshi, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    overflow-x: clip;
}

/* Resets in a cascade layer, so they rank below the Tailwind utilities the
   admin tools on a ticket still carry. */
@layer su-reset {
    :where(.su) *, :where(.su) *::before, :where(.su) *::after { box-sizing: border-box; }
    :where(.su) :where(ul, ol) { list-style: none; margin: 0; padding: 0; }
    :where(.su) :where(h1, h2, h3, p) { margin: 0; }
    :where(.su) :where(a) { color: inherit; text-decoration: none; }
    :where(.su) :where(button, input, select, textarea) { font: inherit; color: inherit; }
}
.su .hidden { display: none !important; }
.su :focus-visible { outline: 3px solid var(--ember-glow); outline-offset: 3px; }

.su-wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
@media (min-width: 640px) { .su-wrap { width: min(1080px, 100% - 64px); } }
.su-wrap--narrow { width: min(760px, 100% - 32px); }

/* ═══════════════════════════ THE FRONT WINDOW ═══════════════════════════ */
.su-window {
    color: var(--paper); padding: clamp(34px, 5vw, 60px) 0 clamp(36px, 5vw, 62px);
    background: radial-gradient(900px 520px at 85% 0%, rgba(214, 90, 49, .16), transparent 62%), var(--ink);
}
.su-window__row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 28px; }
.su-window__copy { display: grid; gap: 14px; justify-items: start; min-width: 0; max-width: 680px; }
.su-kicker { font: 800 12px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ember-glow); }
/* Inside an artist's workspace its heading rule (.aw-tool-page .aw-content h1) reaches this too. */
.su .su-window h1.su-title {
    font: 640 clamp(2.1rem, 1.3rem + 3vw, 3.6rem)/1.06 var(--display); letter-spacing: -0.01em; text-wrap: balance; overflow-wrap: anywhere; color: var(--paper);
}
.su-lede { max-width: 560px; font-size: clamp(15.5px, .95rem + .2vw, 17px); line-height: 1.6; color: rgba(247, 243, 236, .84); }
.su-back { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: rgba(247, 243, 236, .76); }
.su-back:hover { color: var(--paper); }
.su-window__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.su-window__actions form { margin: 0; }

/* ═══════════════════════════ BUTTONS AND STAMPS ═══════════════════════════ */
.su-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px;
    border: 1.5px solid transparent; border-radius: 999px; font: 800 14.5px/1.2 var(--sans); cursor: pointer; transition: background-color .2s, transform .2s, border-color .2s;
}
.su-btn:hover { transform: translateY(-1px); }
.su-btn--ember { background: var(--ember-ui); color: #fff; box-shadow: 0 14px 30px -14px rgba(214, 90, 49, .9); }
.su-btn--ember:hover { background: var(--ember-deep); }
.su-btn--ghost { background: transparent; color: var(--paper); border-color: rgba(247, 243, 236, .34); min-height: 40px; padding: 8px 16px; font-size: 13px; }
.su-btn--ghost:hover { border-color: var(--paper); }
.su-btn--line { background: transparent; color: var(--ink); border-color: rgba(28, 23, 18, .25); }
.su-btn--line:hover { border-color: var(--ink); }

.su-stamp {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1.5px solid currentColor;
    font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.su-stamp--active { color: var(--ember-deep); background: var(--ember-tint); border-color: transparent; }
.su-stamp--replied { color: var(--green); background: var(--green-tint); border-color: transparent; }
.su-stamp--waiting_on_user { color: var(--amber); background: var(--amber-tint); border-color: transparent; }
.su-stamp--closed { color: var(--soft); background: var(--paper-2); border-color: transparent; }
.su-window .su-stamp--closed { color: var(--on-ink-soft); background: rgba(247, 243, 236, .1); }

/* ═══════════════════════════ THE PAGE AND ITS CARDS ═══════════════════════════ */
.su-body { padding: clamp(28px, 4vw, 48px) 0 clamp(56px, 7vw, 96px); }
.su-card {
    border: 1px solid var(--line); border-radius: 18px; background: var(--card);
    box-shadow: 0 1px 2px rgba(28, 23, 18, .04), 0 22px 36px -32px rgba(28, 23, 18, .6);
}
.su-card + .su-card { margin-top: 16px; }
.su-card__pad { padding: clamp(20px, 3vw, 28px); }
.su-card__title { font: 650 1.2rem/1.2 var(--display); letter-spacing: -0.01em; }
.su-notice { margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; line-height: 1.45; }
.su-notice--ok { background: var(--green-tint); color: var(--green); }
.su-notice--warn { background: var(--amber-tint); color: var(--amber); }
.su-notice--err { background: #FCE4E2; color: #9A2B20; }

/* ═══════════════════════════ THE FORM ═══════════════════════════ */
.su-form { display: grid; gap: 16px; }
.su-fieldset { display: grid; gap: 16px; }
.su-fieldset__label { font-size: 11.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.su-grid-2 { display: grid; gap: 16px; }
@media (min-width: 640px) { .su-grid-2 { grid-template-columns: 1fr 1fr; } }
.su-field { display: grid; gap: 7px; min-width: 0; }
.su-label { font-size: 14px; font-weight: 750; color: var(--ink); }
/* Inside an artist's workspace its form rule (.aw-tool-page .aw-content :where(input, select)) reaches these too. */
.su .su-field :is(.su-input, .su-textarea) {
    width: 100%; min-height: 50px; padding: 12px 15px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
    color: var(--ink); font-size: 16px; line-height: 1.45; box-shadow: none; outline: none; transition: border-color .15s, box-shadow .15s;
}
.su .su-field .su-textarea { min-height: 160px; resize: vertical; }
.su .su-field :is(.su-input, .su-textarea)::placeholder { color: #9A8F84; }
.su .su-field :is(.su-input, .su-textarea):focus { border-color: var(--ember-ui); box-shadow: 0 0 0 3px rgba(214, 90, 49, .18); }
.su-static { min-height: 50px; padding: 13px 15px; border-radius: 14px; background: var(--paper); border: 1.5px dashed var(--line); font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.su-help { font-size: 13px; line-height: 1.45; color: var(--soft); }
.su-error { font-size: 13.5px; font-weight: 600; color: #9A2B20; }
/* The attachments: the file input dressed as a drop zone. */
.su-drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px dashed #D3C6B4; border-radius: 14px; background: var(--paper); cursor: pointer; }
.su-drop:hover, .su-drop:focus-within { border-color: var(--ember-ui); }
.su-drop i { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); color: var(--ember-ui); box-shadow: 0 0 0 1px var(--line); }
.su-drop span { font-size: 14px; font-weight: 700; }
.su-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.su-files { display: flex; flex-wrap: wrap; gap: 8px; }
.su-files:empty { display: none; }
.su-file { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 8px 6px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 13px; }
.su-file img, .su-file__kind { flex: none; width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.su-file__kind { display: grid; place-items: center; background: var(--paper-2); font-size: 10px; font-weight: 800; color: var(--soft); }
.su-file__name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-file button { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 50%; background: none; color: #9A2B20; font-size: 16px; font-weight: 800; cursor: pointer; }
.su-file button:hover { background: #FCE4E2; }
.su-form__end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; }

/* ═══════════════════════════ THE TICKETS ═══════════════════════════ */
.su-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.su-filters a {
    padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card);
    font-size: 13.5px; font-weight: 800; color: var(--soft); transition: border-color .2s, color .2s;
}
.su-filters a:hover { border-color: var(--ink); color: var(--ink); }
.su-filters a[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.su-tickets { display: grid; gap: 12px; }
.su-ticket { display: grid; gap: 10px; padding: 18px 20px; transition: transform .2s, box-shadow .2s; }
.su-ticket:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(28, 23, 18, .05), 0 26px 40px -30px rgba(28, 23, 18, .7); }
.su-ticket__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.su-ticket__subject { font: 650 1.12rem/1.3 var(--display); letter-spacing: -0.005em; overflow-wrap: anywhere; }
.su-ticket__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 13px; color: var(--soft); }
.su-ticket__meta i { color: var(--ember-ui); margin-right: 4px; }
.su-empty { display: grid; justify-items: center; gap: 14px; padding: 40px 20px; text-align: center; color: var(--soft); }
.su-empty i { font-size: 26px; color: #BFAE97; }

/* ═══════════════════════════ THE THREAD ═══════════════════════════ */
.su-layout { display: grid; gap: 20px; }
@media (min-width: 1024px) { .su-layout.has-side { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } }
.su-thread { display: grid; gap: 18px; }
.su-msg { display: flex; align-items: flex-end; gap: 10px; }
.su-msg--team { flex-direction: row-reverse; }
.su-msg__avatar {
    flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden;
    background: var(--paper-2); color: var(--ember-deep); font: 700 16px/1 var(--display); box-shadow: 0 0 0 2px var(--card);
}
.su-msg--team .su-msg__avatar { background: var(--ink); }
.su-msg__avatar img { width: 100%; height: 100%; object-fit: cover; }
.su-msg__col { display: grid; gap: 5px; max-width: min(620px, 100%); min-width: 0; }
.su-msg__when { font-size: 12px; color: var(--soft); }
.su-msg--team .su-msg__when { text-align: right; }
.su-msg__bubble { padding: 12px 16px 14px; border-radius: 18px 18px 18px 6px; background: var(--card); border: 1px solid var(--line); overflow-wrap: anywhere; }
.su-msg--team .su-msg__bubble { border-radius: 18px 18px 6px 18px; background: var(--ink); border-color: var(--ink); color: var(--paper); }
.su-msg.is-internal .su-msg__bubble { background: var(--amber-tint); border-color: #EBD3A2; color: var(--ink); }
.su-msg__who { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.su-msg--team .su-msg__who { color: var(--ember-glow); }
.su-msg.is-internal .su-msg__who { color: var(--amber); }
.su-msg__text { margin-top: 6px; font-size: 15px; line-height: 1.55; white-space: pre-line; }
.su-msg__text a { text-decoration: underline; text-underline-offset: 2px; }
.su-msg__tr { margin-top: 8px; font-size: 11.5px; font-weight: 600; color: var(--soft); }
.su-msg--team .su-msg__tr { color: rgba(247, 243, 236, .72); }
.su-msg__tr button { border: 0; padding: 0; background: none; color: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.su-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.su-attachment {
    display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 10px 6px 6px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 12.5px; cursor: pointer;
}
.su-attachment:hover { border-color: var(--ember-ui); }
.su-attachment img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.su-attachment i { width: 32px; text-align: center; color: #9A2B20; }
.su-attachment span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-reply { margin-top: 20px; }
.su-side { display: grid; gap: 16px; }
.su-side .su-card { margin: 0; }
.su-side__title { font-size: 11.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }

/* Japanese and Korean: their own type for the headline and the subjects. */
.su:lang(ja) :is(.su-title, .su-ticket__subject, .su-card__title), .su:lang(ko) :is(.su-title, .su-ticket__subject, .su-card__title) {
    font-family: "Fraunces", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; letter-spacing: 0;
}
.su:lang(ja) :is(.su-kicker, .su-stamp, .su-fieldset__label, .su-side__title, .su-msg__who), .su:lang(ko) :is(.su-kicker, .su-stamp, .su-fieldset__label, .su-side__title, .su-msg__who) { letter-spacing: .04em; }
@media (prefers-reduced-motion: reduce) { .su-btn, .su-ticket { transition: none; } }
