/* Client quote form, quote page and quote details on Business details */
.quote-lines { display: grid; gap: var(--space-2); }

/* Wider screens show one heading row; each line's own labels stay for screen readers */
.quote-lines-head,
.quote-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 168px 28px 36px;
    gap: var(--space-3);
    align-items: center;
}
.quote-lines-head {
    margin-bottom: 6px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}
.quote-line-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* A section heading takes the width of the description and price, and starts a new group */
.quote-line.is-heading > .quote-line-description { grid-column: 1 / 3; }
.quote-line.is-heading input { font-weight: 600; }
.quote-line.is-heading:not(:first-child) { margin-top: var(--space-3); }

.quote-line-move { display: grid; }
.quote-line-move > .icon-button { width: 28px; height: 18px; color: var(--muted); }
.quote-line-move > .icon-button:hover:not(:disabled) { color: var(--ink); }
.quote-line > .icon-button { width: 36px; height: 36px; color: var(--muted); }
.quote-line > .icon-button:hover:not(:disabled) { color: var(--danger); }
.quote-line .icon-button:disabled { opacity: 0.35; cursor: not-allowed; }
.quote-line .input-affix > input { text-align: right; font-variant-numeric: tabular-nums; }

.option-heading {
    display: grid;
    margin: var(--space-5) 0 var(--space-2);
    font-size: 14px;
    font-weight: 600;
}
.side-heading + .option-heading { margin-top: 0; }
.option-number { color: var(--muted); font-size: 12px; font-weight: 400; }

.term-field { margin-bottom: var(--space-2); }
.input-affix-end > span { right: 10px; left: auto; }
.input-affix-end > input { padding-right: 64px; padding-left: 10px; }

.quote-summary dt { color: var(--ink); font-size: 14px; }
.quote-summary .is-total dt { font-weight: 600; }
.quote-summary .is-section dt { padding-top: var(--space-2); color: var(--muted); font-size: 12px; font-weight: 600; }

.logo-preview {
    display: inline-flex;
    justify-self: start;
    max-width: 320px;
    margin-bottom: var(--space-2);
    padding: var(--space-3);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}
.logo-preview img { max-width: 100%; max-height: 72px; }

.choice-grid .choice-row { margin-top: 0; }

.attached-quote {
    display: grid;
    gap: var(--space-3);
    margin: var(--space-3) 0;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
}
.attached-quote-file { display: flex; gap: var(--space-2); align-items: flex-start; }
.attached-quote .hint { margin: 0; }

/* Phones stack each line as a card: label and controls on top, full-width inputs below */
@media (max-width: 640px) {
    .quote-lines-head { display: none; }
    .quote-line {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 6px var(--space-2);
        align-items: end;
        padding: var(--space-3);
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--surface-soft);
    }
    .quote-line.is-heading { background: var(--surface); }
    .quote-line > .field { display: contents; }
    .quote-line-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
    .quote-line-description > label { grid-column: 1; grid-row: 1; }
    .quote-line-description > input { grid-column: 1 / -1; grid-row: 2; }
    .quote-line-price > label { grid-column: 1 / -1; grid-row: 3; margin-top: 6px; }
    .quote-line-price > .input-affix { grid-column: 1 / -1; grid-row: 4; }
    .quote-line-move { grid-column: 2; grid-row: 1; display: flex; }
    .quote-line-move > .icon-button { width: 32px; height: 32px; }
    .quote-line > .remove-line { grid-column: 3; grid-row: 1; width: 32px; height: 32px; }
}

/* Pay later amounts that could not be refreshed */
[data-pay-later-stale] [data-pay-later] { color: var(--muted); }

/* The quote page a client opens from their email */
.client-page { display: grid; gap: var(--space-4); width: min(100%, 720px); margin: 0 auto; }
.client-page > .panel,
.client-page > .notice { margin: 0; }
.client-page-header { display: grid; gap: var(--space-2); }
.client-page-header h1 { margin: 0; }
.client-intro { margin: 0; color: var(--ink-2); }
.client-logo { justify-self: start; max-width: 220px; max-height: 56px; margin-bottom: var(--space-2); }

.client-options { display: grid; gap: var(--space-3); margin: 0; padding: 0; border: 0; }
.client-option { display: grid; gap: var(--space-3); margin: 0; cursor: pointer; }
.client-options:disabled .client-option { cursor: default; }
.client-option-head { display: flex; align-items: flex-start; gap: var(--space-3); }
.client-option-head input { margin-top: 3px; }
.client-option-head > span { display: grid; }
.client-option-head strong { font-size: 15px; font-weight: 600; }
.client-option .summary-list { margin-left: calc(13px + var(--space-3)); }
.client-page .summary-list dd { white-space: nowrap; }
.client-option-note { margin: 0 0 0 calc(13px + var(--space-3)); color: var(--muted); font-size: 13px; }
.client-choice-form > .hint { margin: var(--space-3) 0 0; }
.client-choice-actions { display: grid; gap: var(--space-2); justify-items: start; margin-top: var(--space-4); }
.client-choice-actions .hint { margin: 0; }

.client-contact > p { margin: 0 0 var(--space-2); }
.client-contact-list { display: grid; gap: var(--space-2); margin: 0 0 var(--space-4); padding: 0; list-style: none; }
.client-contact-list li { display: flex; align-items: center; gap: var(--space-2); }
.client-contact-list .icon { color: var(--muted); }

.client-privacy { padding: 0; }
.client-privacy > summary { padding: var(--space-4) var(--space-5); font-weight: 500; cursor: pointer; }
.client-privacy-body { padding: 0 var(--space-5) var(--space-4); color: var(--ink-2); font-size: 13px; }
.client-privacy-link { margin: var(--space-3) 0 0; }
.client-privacy-link a { color: var(--ink); font-weight: 500; }

@media (max-width: 640px) {
    .client-option .summary-list,
    .client-option-note { margin-left: 0; }
    .client-privacy > summary { padding: var(--space-3) var(--space-4); }
    .client-privacy-body { padding: 0 var(--space-4) var(--space-4); }
}
