/* Client portal of the technical support: one column, phone first. Colors follow the theme of the system. */
:root {
    /* overridden from the settings of the support (Support::colorsCss) */
    --p-head: #272d4d;
    --p-head-ink: #ffffff;
    --p-accent: #f5b301;
    --p-accent-ink: #1d2140;
    --p-link: #3b4a9a;
    --p-bg: #f3f5f8;
    --p-card: #ffffff;
    --p-ink: #33373d;
    --p-muted: #5f6670;
    --p-line: #e1e5eb;
    --p-mine: #e9ebf4;
    --amber: #FFF1D2;
    --amber-ink: #8A5A00;
    --danger: #B4321F;
    --radius: 14px;
    --tint: color-mix(in srgb, var(--p-link) 9%, var(--p-card));
    --field: color-mix(in srgb, var(--p-line) 70%, var(--p-ink) 18%);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--p-bg); color: var(--p-ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Georgian", Arial, sans-serif; }
a { color: var(--p-link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; line-height: 1.25; margin: 4px 0 12px; }
h2 { font-size: 18px; margin: 0 0 10px; }
h3 { font-size: 16px; margin: 0 0 8px; }
p { margin: 0 0 10px; }
img { max-width: 100%; }

/* header */
.p-top { background: var(--p-head); color: var(--p-head-ink); position: sticky; top: 0; z-index: 10; padding-top: env(safe-area-inset-top); }
.p-top-in { max-width: 760px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.p-brand { display: flex; align-items: center; gap: 10px; color: inherit; min-width: 0; }
.p-brand:hover { text-decoration: none; }
.p-brand span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.p-brand b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-brand small { font-size: 12px; opacity: .75; }
.p-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.p-nav-link { display: inline-flex; align-items: center; gap: 6px; color: inherit; background: none; border: 0; font: inherit; font-size: 14px; padding: 8px; border-radius: 10px; cursor: pointer; min-height: 40px; }
.p-nav-link:hover { background: color-mix(in srgb, currentColor 12%, transparent); text-decoration: none; }
.p-langs { display: inline-flex; gap: 2px; margin-right: 4px; }
.p-langs a { color: inherit; opacity: .7; font-size: 12px; font-weight: 600; padding: 6px 7px; border-radius: 8px; }
.p-langs a[aria-current="true"] { background: color-mix(in srgb, currentColor 16%, transparent); opacity: 1; }
.p-inline { display: inline; margin: 0; }

/* page */
.p-main { max-width: 760px; margin: 0 auto; padding: 16px 16px calc(40px + env(safe-area-inset-bottom)); }
.p-back { display: inline-block; margin-bottom: 8px; font-size: 15px; padding: 6px 0; }
.p-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.p-section { margin-top: 24px; }
.p-muted { color: var(--p-muted); }
.p-small { font-size: 14px; }
.p-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.p-block { display: block; overflow-wrap: anywhere; }
.p-grow { flex: 1 1 auto; min-width: 0; }
.p-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.p-req { color: var(--danger); font-style: normal; }
.p-big { font-size: 20px; font-weight: 700; margin: 4px 0 8px; }
.p-foot { max-width: 760px; margin: 0 auto; padding: 0 16px 32px; color: var(--p-muted); font-size: 14px; }

/* cards and messages */
.p-card { background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.p-card-tint { background: var(--tint); border-color: color-mix(in srgb, var(--p-link) 22%, var(--p-card)); }
.p-card-amber { background: var(--amber); border-color: #F3D9A0; }
.p-narrow { max-width: 460px; margin: 12px auto; }
.p-empty { padding: 18px; text-align: center; color: var(--p-muted); background: var(--p-card); border: 1px dashed var(--p-line); border-radius: var(--radius); }
.p-note { background: var(--tint); padding: 10px 12px; border-radius: 10px; margin: 8px 0; }
.p-sep { height: 1px; background: var(--p-line); margin: 16px 0; }
.p-flash { padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; background: var(--tint); }
.p-flash-error { background: #FFE9E5; color: #7d1f12; }
.p-flash-info { background: var(--amber); color: var(--amber-ink); }
.p-icon-big { color: var(--p-link); margin: 4px 0 8px; }

/* buttons */
.p-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--field); background: var(--p-card); color: var(--p-ink); font: inherit; font-weight: 600; cursor: pointer; text-align: center; }
.p-btn:hover { text-decoration: none; border-color: var(--p-link); }
.p-btn:disabled { opacity: .6; cursor: progress; }
.p-btn-primary { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-accent-ink); }
.p-btn-primary:hover { background: color-mix(in srgb, var(--p-accent) 88%, #000); border-color: color-mix(in srgb, var(--p-accent) 88%, #000); }
.p-btn-ghost { background: transparent; border-color: transparent; color: var(--p-muted); font-weight: 500; }
.p-btn-block { display: flex; width: 100%; }
.p-btn-lg { min-height: 54px; font-size: 17px; margin: 8px 0; }
.p-btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.p-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.p-actions-2 > * { flex: 1 1 140px; }

/* forms */
.p-form { display: block; }
.p-field { display: block; margin-bottom: 14px; }
.p-field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.p-field input[type=text], .p-field input[type=email], .p-field input[type=password], .p-field input[type=tel], .p-field select, .p-field textarea,
.p-reply textarea {
    width: 100%; font: inherit; font-size: 16px; color: var(--p-ink); background: var(--p-card); border: 1px solid var(--field); border-radius: 12px; padding: 12px 14px; min-height: 48px;
}
.p-field textarea, .p-reply textarea { resize: vertical; line-height: 1.45; }
.p-field input:focus, .p-field select:focus, .p-field textarea:focus, .p-reply textarea:focus { outline: none; border-color: var(--p-link); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p-link) 18%, transparent); }
.p-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.p-row .p-field { margin-bottom: 0; }
.p-pass { display: flex; gap: 8px; }
.p-pass input { flex: 1; min-width: 0; }
.p-file { position: relative; display: block; cursor: pointer; }
.p-file input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.p-file-icon { display: inline-block; }
.p-file-icon .p-btn { min-width: 46px; padding: 10px; }
.p-add { margin-top: 10px; }
.p-add > summary { cursor: pointer; color: var(--p-link); font-weight: 600; padding: 8px 0; list-style-position: inside; }

/* segmented choice */
.p-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--p-bg); border: 1px solid var(--p-line); border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.p-seg label { position: relative; }
.p-seg input { position: absolute; opacity: 0; }
.p-seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 42px; padding: 6px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--p-muted); cursor: pointer; line-height: 1.2; }
.p-seg input:checked + span { background: var(--p-card); color: var(--p-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.p-seg input:focus-visible + span { outline: 2px solid var(--p-link); }

/* lists of requests and devices */
.p-list { display: grid; gap: 10px; }
.p-item { display: flex; flex-direction: column; gap: 4px; background: var(--p-card); border: 1px solid var(--p-line); border-radius: var(--radius); padding: 14px 16px; color: var(--p-ink); }
a.p-item:hover { text-decoration: none; border-color: var(--p-link); }
.p-item-done { opacity: .72; }
.p-item-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.p-item-title { font-weight: 600; font-size: 16px; }
.p-item-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.p-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--p-link); color: #fff; font-size: 12.5px; font-weight: 600; }
.p-badge-amber { background: var(--amber); color: var(--amber-ink); }
.p-badge-grey { background: var(--p-bg); color: var(--p-muted); }
.p-st { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.p-st-new { background: var(--amber); color: var(--amber-ink); }
.p-st-work { background: #DFEEFD; color: #1A5FA8; }
.p-st-info { background: #FFE6D5; color: #9A3D00; }
.p-st-closed { background: var(--p-bg); color: var(--p-muted); border: 1px solid var(--p-line); }

/* a request */
.p-ticket-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.p-ticket-title { margin-top: 8px; overflow-wrap: anywhere; }
.p-chat { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.p-msg { display: flex; }
.p-msg-client { justify-content: flex-end; }
.p-msg-system { justify-content: center; }
.p-bubble { max-width: 86%; padding: 10px 13px 6px; border-radius: 16px; background: var(--p-card); border: 1px solid var(--p-line); }
.p-msg-client .p-bubble { background: var(--p-mine); border-color: color-mix(in srgb, var(--p-mine) 85%, var(--p-ink)); border-bottom-right-radius: 6px; }
.p-msg-staff .p-bubble { border-bottom-left-radius: 6px; }
.p-author { font-size: 13px; font-weight: 700; color: var(--p-link); margin-bottom: 2px; }
.p-text { overflow-wrap: anywhere; }
.p-time { display: block; font-size: 11.5px; color: var(--p-muted); text-align: right; margin-top: 4px; }
.p-sys { font-size: 13px; color: var(--p-muted); text-align: center; background: color-mix(in srgb, var(--p-line) 60%, var(--p-bg)); padding: 6px 12px; border-radius: 10px; max-width: 92%; overflow-wrap: anywhere; }
.p-sys .p-time { display: inline; margin-left: 6px; }
.p-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.p-thumb img { display: block; width: 132px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid var(--p-line); }
.p-filelink { display: inline-flex; gap: 6px; align-items: center; padding: 7px 10px; border-radius: 10px; background: var(--p-bg); font-size: 14px; overflow-wrap: anywhere; }
.p-reply { position: sticky; bottom: 0; background: var(--p-bg); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); margin-bottom: 14px; z-index: 5; }
.p-reply textarea { min-height: 54px; }
.p-reply-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.p-history { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; overflow-wrap: anywhere; }
.p-ticket-foot { text-align: center; margin-top: 8px; }
.p-access [hidden] { display: none; }

@media (max-width: 560px) {
    .p-hide-sm { display: none; }
    h1 { font-size: 21px; }
    .p-card { padding: 14px; }
    .p-bubble { max-width: 92%; }
    .p-seg span { font-size: 13px; }
}
@media (min-width: 900px) {
    .p-main { padding-top: 24px; }
}
.p-field > span.p-pass { display: flex; font-size: inherit; font-weight: 400; margin-bottom: 0; }
