/**
 * Customer support tickets (#85) — the store "Message" lightbox and the
 * buyer's My Account › Support Tickets list + conversation.
 * Ported from the reference support-tickets.js (.ts-sup-*), minus its
 * prototype-only switch. Markup: inc/support-tickets.php,
 * dokan/store-support/support-tickets.php.
 */
.ts-sup, .ts-sup * { box-sizing: border-box; }
.ts-sup { font-family: "Inter", system-ui, sans-serif; color: #1C1A18; font-size: 14px; line-height: 1.5; }
.ts-sup button, .ts-sup input, .ts-sup select, .ts-sup textarea { font-family: inherit; font-size: inherit; }
.ts-sup-pill { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 2px 8px; border: 1px solid #D8D4CE; background: #FAF7F2; color: #1C1A18; white-space: nowrap; }
.ts-sup-pill.open { background: #FBEBE8; border-color: #E9B9B0; color: #9B3B2C; }
.ts-sup-pill.answered { background: #E4F0EA; border-color: #B9D5C7; color: #3F5C4C; }
.ts-sup-pill.closed { background: #F1EFEC; color: #6B665F; }
.ts-sup-ver { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #3F5C4C; margin-top: 6px; }
.ts-sup-btn { border: 1px solid #1C1A18; background: #1C1A18; color: #fff; border-radius: 4px; padding: 10px 18px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; text-decoration: none; display: inline-block; }
.ts-sup-btn:hover { background: #B48970; border-color: #B48970; color: #fff; }
.ts-sup-btn.ghost { background: #fff; color: #1C1A18; }
.ts-sup-btn.ghost:hover { background: #1C1A18; color: #fff; border-color: #1C1A18; }
.ts-sup-btn.small { padding: 7px 12px; font-size: 11px; }
.ts-sup-btn:disabled { opacity: .5; cursor: wait; }

/* lightbox */
.ts-sup-ov { position: fixed; inset: 0; z-index: 2000; background: rgba(28, 26, 24, .55); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow: auto; }
.ts-sup-ov[hidden] { display: none; }
.ts-sup-box { position: relative; width: 100%; max-width: 560px; background: #fff; border-radius: 14px; padding: 30px 32px 26px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.ts-sup-x { position: absolute; top: 14px; right: 16px; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: #8C8278; }
.ts-sup-x:hover { color: #1C1A18; }
.ts-sup-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #8C8278; margin-bottom: 6px; }
.ts-sup-h { font-family: "Inter", system-ui, sans-serif; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 8px; color: #1C1A18; }
.ts-sup-sub { color: #55514D; margin: 0 0 18px; }
.ts-sup-f { display: block; margin-bottom: 16px; }
.ts-sup-f > span:first-child { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; text-transform: none; letter-spacing: normal; }
.ts-sup-f small { font-weight: 400; color: #8C8278; }
.ts-sup-in { width: 100%; border: 1px solid #D8D4CE; border-radius: 6px; padding: 11px 12px; background: #fff; font-size: 15px; color: #1C1A18; }
.ts-sup-in:focus { outline: none; border-color: #1C1A18; }
.ts-sup-in.err { border-color: #CB7263; }
textarea.ts-sup-in { min-height: 120px; resize: vertical; }
.ts-sup-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ts-sup-note { font-size: 12.5px; color: #8C8278; margin: 14px 0 0; }
.ts-sup-note a { color: #1C1A18; text-decoration: underline; }
.ts-sup-err { display: block; color: #9B3B2C; font-size: 12.5px; margin-top: 5px; }
.ts-sup-err[hidden], [data-sup-step][hidden] { display: none; }
.ts-sup-ok { text-align: center; padding: 8px 0; }
.ts-sup-ok .ico { width: 54px; height: 54px; border-radius: 50%; background: #E4F0EA; color: #3F5C4C; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }

/* list + thread (My Account) */
.ts-sup-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 14px; }
.ts-sup-tab { border: 1px solid #D8D4CE; background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; color: #1C1A18; text-decoration: none; }
.ts-sup-tab.on { background: #1C1A18; color: #fff; border-color: #1C1A18; }
.ts-sup-card { border: 1px solid #D8D4CE; border-radius: 10px; background: #fff; overflow: hidden; }
.ts-sup-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 16px 18px; border-top: 1px solid #D8D4CE; color: inherit; text-decoration: none; }
.ts-sup-item:first-child { border-top: 0; }
.ts-sup-item:hover { background: #FAF7F2; }
.ts-sup-item b { font-weight: 700; }
.ts-sup-meta { font-size: 12.5px; color: #8C8278; }
.ts-sup-snip { color: #55514D; font-size: 13.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-sup-empty { padding: 34px 18px; text-align: center; color: #8C8278; }
.ts-sup-back { display: inline-block; font-size: 13px; font-weight: 600; text-decoration: underline; color: #1C1A18; margin-bottom: 12px; }
.ts-sup-th { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.ts-sup-msg { max-width: 88%; border-radius: 10px; padding: 12px 14px; background: #F6F3EE; }
.ts-sup-msg.seller { align-self: flex-end; background: #E4F0EA; }
.ts-sup-msg .who { font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.ts-sup-msg .who span { font-weight: 400; color: #8C8278; margin-left: 6px; }
.ts-sup-msg img { display: block; max-width: 100%; max-height: 260px; margin-top: 10px; border-radius: 6px; border: 1px solid #D8D4CE; }
.ts-sup-reply { border-top: 1px solid #D8D4CE; padding: 16px 18px; background: #FCFBF9; margin: 0; }
.ts-sup-head { padding: 16px 18px; border-bottom: 1px solid #D8D4CE; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.ts-sup-head form { margin: 0; }
.ts-sup-title { font-size: 17px; font-weight: 800; margin: 3px 0; }

@media (max-width: 640px) {
	.ts-sup-box { padding: 26px 20px 22px; }
	.ts-sup-item { grid-template-columns: 1fr; }
}

/* account.css paints account buttons terracotta; keep the reference ink / outline. */
.ts-acct-v2 .acct-content .ts-sup-btn { background: #1C1A18; border-color: #1C1A18; color: #fff; }
.ts-acct-v2 .acct-content .ts-sup-btn:hover { background: #B48970; border-color: #B48970; }
.ts-acct-v2 .acct-content .ts-sup-btn.ghost { background: #fff; color: #1C1A18; border-color: #1C1A18; }
.ts-acct-v2 .acct-content .ts-sup-btn.ghost:hover { background: #1C1A18; color: #fff; }
