/* The support portal in Daylight Glass (redesign_support_files/SITE-REDESIGN-PLAN.md, Phase 7; the approved mockup
   is the "VosCast support portal" design canvas). Loads after tokens.css, site.css and forms.css on the portal's
   pages ($vcPageCss array('forms', 'portal'), set by support/include/client/header.inc.php). Buttons, tabs,
   chips, fields and alerts are in site.css and forms.css; the ticket table, thread, detail list and attachment
   tags use the staff panel's class names, drawn here for the public site. */

.vc-portal { min-height: 70vh; padding-top: var(--vc-header-h); background: var(--bg); color: var(--ink); }
.vc-portal [hidden] { display: none !important; }

/* The bar under the site header: the portal's pages, and who is signed in */
.vc-portal-bar { border-bottom: 1px solid var(--rule); background: var(--card); }
.vc-portal-bar__in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; max-width: var(--vc-page-max); margin: 0 auto; padding: 10px var(--vc-gutter); }
.vc-portal-bar .vc-tabs { max-width: 100%; }
.vc-portal-bar__who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 0 auto; color: var(--mut2); font-size: 14px; line-height: 20px; }
.vc-portal-bar__who strong { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.vc-portal-bar__out { color: var(--mut); font-size: 14px; font-weight: 700; }
.vc-portal-bar__out:hover, .vc-portal-bar__out:focus { color: var(--acc-strong); }

/* Page frame and head */
.vc-portal-page { padding: clamp(28px, 4vw, 44px) 0 clamp(56px, 7vw, 88px); }
.vc-portal-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; }
.vc-portal-head__copy { flex: 1 1 520px; min-width: 0; }
.vc-portal-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vc-portal-title { margin: 14px 0 0; font-size: clamp(32px, 3.2vw, 44px); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em; text-wrap: balance; overflow-wrap: anywhere; }
.vc-portal-title span { color: var(--acc-large); }
.vc-portal-lead { max-width: 680px; margin: 10px 0 0; color: var(--mut); font-size: 17px; line-height: 1.5; text-wrap: pretty; }
.vc-portal-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; margin-top: 28px; }
.vc-portal-main { flex: 2 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.vc-portal-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.vc-portal-ink .vc-portal-glyph { color: var(--lime); }
.vc-portal-quiet { padding: 0; border: 0; background: none; color: var(--mut); font-family: var(--font-sans); font-stretch: 96%; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.vc-portal-quiet:hover, .vc-portal-quiet:focus { color: var(--acc-strong); }

/* Cards and side panels */
.vc-portal-box { border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--card); box-shadow: var(--shadow-card); }
.vc-portal-card { padding: 24px; }
.vc-portal-card__title { margin: 0; font-size: 20px; line-height: 26px; font-weight: 800; letter-spacing: -0.02em; }
.vc-portal-card__title--sm { font-size: 16px; line-height: 22px; font-weight: 700; letter-spacing: -0.01em; }
.vc-portal-card__text { margin: 6px 0 0; color: var(--mut); font-size: 15px; line-height: 22px; }
.vc-portal-label { color: var(--mut2); font-family: var(--font-mono); font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.vc-portal-help { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--panel-strong); }
.vc-portal-help p { margin: 0; }
.vc-portal-help__title { font-weight: 700; }
.vc-portal-help__text { margin-top: 4px !important; color: var(--mut); font-size: 14px; line-height: 20px; }
.vc-portal-help__links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px !important; font-size: 15px; font-weight: 700; }
.vc-portal-help a { color: var(--ink); }
.vc-portal-help a:hover, .vc-portal-help a:focus { color: var(--acc-strong); }
.vc-portal-list { margin: 10px 0 0; padding: 0; list-style: none; }
.vc-portal-list li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); color: var(--ink2); font-size: 15px; line-height: 21px; }
.vc-portal-list li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--lime); }
.vc-portal-callout { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel-strong); font-size: 15px; line-height: 22px; }
.vc-portal-callout a { margin-left: auto; color: var(--ink); font-weight: 700; }
.vc-portal-callout a:hover, .vc-portal-callout a:focus { color: var(--acc-strong); }

/* Forms: the Field component (forms.css) with the mockup's mono labels */
.vc-portal-form { display: grid; gap: 20px; margin-top: 20px; }
.vc-portal-form > .vc-alert { margin-bottom: 2px; }
.vc-portal-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.vc-portal .vc-field__label { color: var(--mut2); font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.vc-portal .vc-field__optional { margin-left: 6px; color: var(--mut3); }
.vc-portal .vc-input[readonly] { background: var(--panel); color: var(--mut); box-shadow: none; }
.vc-portal .vc-input[readonly]:hover { border-color: var(--line-control); }
.vc-portal-textarea { display: block; width: 100%; min-height: 200px; margin: 0; padding: 12px 16px; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); font-family: var(--font-sans); font-stretch: 96%; font-size: 16px; line-height: 24px; box-shadow: inset 0 1px 2px rgba(15,22,38,.05); resize: vertical; transition: border-color .15s ease; }
.vc-portal-textarea::placeholder { color: var(--mut3); opacity: 1; }
.vc-portal-textarea:hover { border-color: var(--ink2); }
.vc-site .vc-portal-textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.vc-portal-textarea[aria-invalid="true"], .vc-select[aria-invalid="true"] { border-color: var(--danger); }
.vc-portal-file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px; border: 1px dashed var(--line-control); border-radius: var(--radius-md); background: var(--panel); }
.vc-portal-file input { min-width: 0; max-width: 100%; color: var(--mut); font-family: var(--font-sans); font-stretch: 96%; font-size: 14px; }
.vc-portal-file input::file-selector-button { height: 32px; margin-right: 12px; padding: 0 14px; border: 1px solid var(--line-control); border-radius: var(--radius-pill); background: var(--card); color: var(--ink); font-family: var(--font-sans); font-stretch: 96%; font-size: 13px; font-weight: 700; cursor: pointer; }
.vc-portal-file input::file-selector-button:hover { background: var(--bg2); }
.vc-portal-file[aria-invalid="true"] { border-color: var(--danger); }
.vc-portal-captcha { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.vc-portal-captcha img { display: block; height: 52px; width: auto; border: 1px solid var(--line-control); border-radius: var(--radius-sm); background: var(--card); }
.vc-portal-captcha .vc-input { width: 180px; }
.vc-portal-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-top: 20px; border-top: 1px solid var(--rule); }
.vc-portal-form__foot .vc-btn { height: 46px; padding: 0 22px; font-size: 15px; }
.vc-portal-form__note { margin: 0 0 0 auto; color: var(--mut2); font-size: 14px; }

/* Ticket list: the staff panel's data table */
.vc-portal-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.vc-portal-count { margin: 0; color: var(--mut2); font-family: var(--font-mono); font-size: 13px; }
.vc-portal .vc-tab__count { color: var(--mut2); font-family: var(--font-mono); font-size: 11px; font-weight: 700; }
.vc-portal .vc-tab[aria-current="page"] .vc-tab__count { color: var(--acc-strong); }
.vc-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--card); box-shadow: var(--shadow-card); }
.vc-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 21px; }
.vc-table th { padding: 11px 16px; border-bottom: 1px solid var(--line); background: var(--bg2); color: var(--mut2); font-family: var(--font-mono); font-size: 11px; line-height: 14px; font-weight: 500; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.vc-table th a { color: inherit; text-decoration: none; }
.vc-table th a:hover, .vc-table th a:focus { color: var(--ink); }
.vc-table th[aria-sort] { color: var(--ink); }
.vc-table th[aria-sort="ascending"] a::after { content: " ↑"; }
.vc-table th[aria-sort="descending"] a::after { content: " ↓"; }
.vc-table td { padding: 14px 16px; border-top: 1px solid var(--rule); color: var(--ink2); vertical-align: middle; }
.vc-table tbody tr:first-child td { border-top: 0; }
.vc-table tbody tr { position: relative; }
.vc-table tbody tr:hover td { background: var(--panel); }
.vc-table .vc-cell-mono { font-family: var(--font-mono); font-size: 13px; color: var(--ink); white-space: nowrap; }
.vc-table .vc-cell-muted { color: var(--mut2); font-size: 14px; white-space: nowrap; }
.vc-table .vc-row-link { color: var(--ink); font-weight: 700; text-decoration: none; }
.vc-table .vc-row-link::after { content: ""; position: absolute; inset: 0; }
.vc-table .vc-row-link:focus-visible { outline: none; }
.vc-table tbody tr:focus-within { outline: 2px solid var(--focus); outline-offset: -2px; }
.vc-table tr.is-closed .vc-row-link { color: var(--mut); font-weight: 500; }
.vc-portal-subject { display: flex; flex-direction: column; gap: 2px; min-width: 220px; }
.vc-portal-subject small { color: var(--mut2); font-family: var(--font-mono); font-size: 11px; line-height: 14px; letter-spacing: .04em; }
.vc-chip--closed { background: transparent; }
.vc-portal-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px; border-top: 1px solid var(--rule); color: var(--mut2); font-size: 14px; }
.vc-portal-pager__pages { display: flex; flex-wrap: wrap; gap: 4px; }
.vc-portal-pager__link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 34px; height: 34px; padding: 0 10px; border-radius: var(--radius-pill); color: var(--ink2); font-family: var(--font-mono); font-size: 13px; font-weight: 500; text-decoration: none; }
a.vc-portal-pager__link:hover, a.vc-portal-pager__link:focus { background: var(--neutral-soft); color: var(--ink); }
.vc-portal-pager__link[aria-current="page"] { background: var(--ink); color: var(--onink); }
.vc-portal-empty { padding: 56px 24px; text-align: center; }
.vc-portal-empty .vc-portal-card__text { max-width: 440px; margin-left: auto; margin-right: auto; }
.vc-portal-empty .vc-portal-head__actions { justify-content: center; margin-top: 18px; }

/* Ticket view: the thread, the reply form and the details */
.vc-portal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; color: var(--mut2); font-family: var(--font-mono); font-size: 13px; }
.vc-portal-thread { display: flex; flex-direction: column; gap: 14px; }
#reply { scroll-margin-top: calc(var(--vc-header-h) + 16px); }
.vc-portal-day { display: flex; align-items: center; gap: 12px; margin: 4px 0 0; color: var(--mut2); font-family: var(--font-mono); font-size: 11px; line-height: 14px; letter-spacing: .08em; text-transform: uppercase; }
.vc-portal-day::before, .vc-portal-day::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.vc-message { padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius-panel); background: var(--card); }
.vc-message--staff { background: var(--lime-tint); border-color: var(--lime-line); }
.vc-message__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.vc-message__who { color: var(--ink); font-size: 15px; font-weight: 700; }
.vc-message__role { color: var(--mut2); font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.vc-message__meta { margin-left: auto; color: var(--mut2); font-family: var(--font-mono); font-size: 12px; }
.vc-message__body { margin: 0; color: var(--ink2); font-size: 15px; line-height: 24px; overflow-wrap: anywhere; }
.vc-message__body a { color: var(--ink); }
.vc-message__body a:hover, .vc-message__body a:focus { color: var(--acc-strong); }
.vc-portal-files { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.vc-portal-file-tag, .vc-portal-files a { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 12px; border: 1px solid var(--line-tag); border-radius: var(--radius-pill); background: var(--panel-strong); color: var(--ink2); font-family: var(--font-mono); font-size: 12px; line-height: 18px; text-decoration: none; overflow-wrap: anywhere; }
.vc-portal-files a:hover, .vc-portal-files a:focus { border-color: var(--line-control); color: var(--ink); }
.vc-portal-files a span { color: var(--mut2); white-space: nowrap; }
.vc-details { display: grid; grid-template-columns: minmax(72px, max-content) minmax(0, 1fr); margin: 12px 0 0; }
.vc-details dt { padding: 9px 16px 9px 0; border-top: 1px solid var(--rule); color: var(--mut2); font-family: var(--font-mono); font-size: 11px; line-height: 21px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.vc-details dd { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 9px 0; border-top: 1px solid var(--rule); color: var(--ink); font-size: 15px; line-height: 21px; overflow-wrap: anywhere; }
.vc-details > dt:first-of-type, .vc-details > dt:first-of-type + dd { border-top: 0; }
.vc-details .vc-mono { font-family: var(--font-mono); font-size: 14px; }

/* Ticket received */
.vc-portal-done { max-width: 760px; margin: 0 auto; padding: clamp(28px, 4vw, 40px); }
.vc-portal-mark { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 20px; border-radius: 50%; background: var(--lime); color: var(--on-lime); box-shadow: var(--shadow-cta); }
.vc-portal-mark svg { display: block; width: 26px; height: 26px; }
.vc-portal-done .vc-portal-title { margin-top: 18px; }
.vc-portal-done__id { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 24px; padding: 14px 18px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--bg); }
.vc-portal-done__id code { font-family: var(--font-mono); font-size: 26px; line-height: 32px; font-weight: 500; color: var(--ink); }
.vc-portal-done__next { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rule); }
.vc-portal-done__next .vc-portal-list li { font-size: 15px; }
.vc-portal-done .vc-portal-head__actions { margin-top: 28px; }

/* Sign-in: the form beside the way in for first-timers */
.vc-portal-cols--sign { align-items: stretch; }
.vc-portal-sign { flex: 3 1 520px; }
.vc-portal-new { flex: 2 1 320px; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.vc-portal-input-id { font-family: var(--font-mono) !important; letter-spacing: .04em; }

@media (max-width: 899px) {
  .vc-portal-side { flex-basis: 100%; }
}
@media (max-width: 640px) {
  .vc-portal-row { grid-template-columns: minmax(0, 1fr); }
  .vc-portal-bar__in { gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .vc-portal-bar .vc-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .vc-portal-bar .vc-tab { height: 30px; padding: 0 11px; font-size: 13px; }
  .vc-portal-bar__who { width: 100%; margin-left: 0; justify-content: space-between; font-size: 13px; }
  .vc-portal-card { padding: 18px; }
  .vc-portal-title { font-size: 28px; line-height: 1.1; letter-spacing: -0.025em; }
  .vc-portal-lead { font-size: 16px; }
  .vc-message { padding: 14px 16px; }
  .vc-message__meta { flex-basis: 100%; margin-left: 0; }
  .vc-portal-form__note { margin-left: 0; }
  .vc-portal-form__foot .vc-btn--dark { flex: 1 1 100%; }
  /* The ticket list becomes one card per ticket. */
  .vc-table thead { display: none; }
  .vc-table, .vc-table tbody, .vc-table tr, .vc-table td { display: block; }
  .vc-table tbody tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 8px 12px; padding: 14px 16px; border-top: 1px solid var(--rule); }
  .vc-table tbody tr:first-child { border-top: 0; }
  .vc-table td { padding: 0; border: 0; }
  .vc-table tbody tr:hover td { background: none; }
  .vc-table td.vc-portal-cell-subject { grid-column: 1 / -1; order: -1; }
  .vc-table td.vc-portal-cell-dept { display: none; }
  .vc-table td.vc-cell-muted { justify-self: end; }
  .vc-portal-subject { min-width: 0; }
}
