/* Support pages (Ticket, Tech Call, Scope). Load after theme.css.
   Laid out as a single column for the 400px-wide window index.html opens. */

body {
    padding: 12px 12px 24px;
}

/* ---------- Header ---------- */

.support-header {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
}

.support-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-title h1 {
    color: var(--accent);
    font-size: 20px;
}

/* Red tag so the outbound window is never mistaken for an inbound one */
.mode-badge {
    padding: 2px 10px;
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid var(--danger);
    border-radius: 999px;
    color: var(--danger);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.support-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ---------- Form ---------- */

.support-form {
    display: grid;
    gap: 12px;
}

.form-card {
    display: grid;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.form-card h2 {
    color: var(--accent);
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.field {
    display: grid;
    gap: 6px;
}

.field-label {
    color: var(--muted);
    font-size: 13px;
}

.text-input {
    width: 100%;
    padding: 7px 9px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.text-input:focus {
    border-color: var(--accent);
    outline: none;
}

.field-notice {
    margin: 0;
    padding: 8px 10px;
    background: rgba(255, 107, 107, 0.12);
    border: 1px solid var(--danger);
    border-radius: 6px;
    color: var(--danger);
    font-weight: 600;
}

textarea.text-input {
    resize: vertical;
}

.link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.link-primary {
    flex: 1;
    padding: 12px 14px;
    font-size: 15px;
}

.link-btn {
    justify-self: start;
    padding: 0;
    background: none;
    border: 0;
    color: var(--accent);
}

/* Colored per vertical (`color` on the admin Verticals tab) */
.admin-link {
    display: block;
    padding: 8px 10px;
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-left: 4px solid var(--vertical-color, var(--accent));
    border-radius: 6px;
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.admin-link:hover {
    border-color: var(--vertical-color, var(--accent));
}

/* ---------- Phones ---------- */

.phone-list {
    display: grid;
    gap: 6px;
}

.phone-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.phone-row .phone-number {
    flex: 1;
    min-width: 0;
}

.phone-row .phone-type {
    flex: none;
    width: 120px;
}

/* ---------- Score card ---------- */

.scorecard {
    display: grid;
    gap: 6px;
}

.score-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-btn {
    flex: none;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    font-weight: 700;
}

.status-up.active {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}

.status-down.active {
    background: #c62828;
    border-color: #c62828;
    color: #fff;
}

/* ---------- Rich text (Quill), recolored for the dark theme ---------- */

.editor-shell .ql-toolbar.ql-snow {
    background: var(--surface-raised);
    border-color: var(--border);
    border-radius: 6px 6px 0 0;
}

.editor-shell .ql-container.ql-snow {
    height: 140px;
    min-height: 80px;
    overflow: auto;
    resize: vertical;
    background: var(--bg);
    border-color: var(--border);
    border-radius: 0 0 6px 6px;
    font: inherit;
}

/* Quill reads gaps between blocks in its hidden paste area as blank lines, so list margins there
   would add an empty line above every list when a draft or picker text is loaded */
.editor-shell .ql-clipboard ul,
.editor-shell .ql-clipboard ol {
    margin: 0;
}

.editor-shell .ql-editor.ql-blank::before {
    color: var(--muted);
    font-style: normal;
}

.editor-shell .ql-snow .ql-stroke {
    stroke: var(--muted);
}

.editor-shell .ql-snow .ql-fill,
.editor-shell .ql-snow .ql-stroke.ql-fill {
    fill: var(--muted);
}

.editor-shell .ql-snow .ql-picker {
    color: var(--muted);
}

.editor-shell .ql-snow.ql-toolbar button:hover .ql-stroke,
.editor-shell .ql-snow.ql-toolbar button.ql-active .ql-stroke,
.editor-shell .ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke {
    stroke: var(--accent);
}

.editor-shell .ql-snow.ql-toolbar button:hover .ql-fill,
.editor-shell .ql-snow.ql-toolbar button.ql-active .ql-fill {
    fill: var(--accent);
}

.editor-shell .ql-snow .ql-picker-options {
    background: var(--surface-raised);
    border-color: var(--border);
}

.editor-shell .ql-snow .ql-tooltip {
    background: var(--surface-raised);
    border-color: var(--border);
    box-shadow: none;
    color: var(--text);
}

.editor-shell .ql-snow .ql-tooltip input[type="text"] {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text);
}

/* ---------- Copy / Clear ---------- */

/* Stays at the bottom of the window while scrolling; the right padding leaves room for the chat bubble */
.support-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    gap: 8px;
    margin: 12px -12px 0;
    padding: 10px 88px 10px 12px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.support-actions .primary-btn {
    flex: 1;
}

/* Lift the toast above the Copy / Clear bar */
.toast {
    bottom: 72px;
}

.support-numbers {
    margin-top: 16px;
    color: var(--muted);
    font-size: 12px;
}

.support-numbers p {
    margin: 2px 0;
}

.support-numbers .link-btn {
    margin-top: 10px;
}
