/*
 * Glance — the site-message form on the ad page and in its search side panel.
 */

.cdlg-note {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: var(--fs-xs);
    line-height: 1.4;
}

.ad-msg-form {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.ad-msg-form textarea {
    width: 100%;
    min-height: 8rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: var(--fs-s);
    line-height: 1.5;
    resize: vertical;
}

.ad-msg-form textarea::placeholder {
    color: var(--muted);
}

.ad-msg-form textarea:focus {
    border-color: var(--accent);
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

.ad-msg-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--muted);
    font-size: var(--fs-2xs);
}

.ad-msg-count {
    flex: 0 0 auto;
    font-variant-numeric: tabular-nums;
}

.ad-msg-error {
    margin: 0;
    color: var(--danger);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.ad-msg-success {
    margin: 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid color-mix(in oklab, var(--accent) 40%, var(--line));
    border-radius: 0.6rem;
    background: var(--accent-tint);
    color: var(--ink);
    font-size: var(--fs-xs);
    font-weight: 600;
}

.ad-msg-success a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ad-msg-error[hidden],
.ad-msg-success[hidden] {
    display: none;
}

.ad-msg-actions {
    display: flex;
    justify-content: flex-start;
}

.ad-msg-actions .btn {
    padding: 0.55rem 1rem;
}

.ad-contact-note-text {
    margin: 0 0 0.4rem;
    color: var(--muted);
    font-size: var(--fs-s);
}

.ad-contact-note-text:last-child {
    margin-bottom: 0;
}

.cdlg .ad-msg-form {
    margin-top: 0;
}

@media (max-width: 30rem) {
    .ad-msg-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }
}

.ad-quote-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.ad-quote-field {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    color: var(--muted);
    font-size: var(--fs-2xs);
    font-weight: 700;
}

.ad-quote-field.ad-quote-full {
    grid-column: 1 / -1;
}

.ad-quote-field input,
.ad-quote-field select {
    width: 100%;
    padding: 0.58rem 0.68rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: var(--fs-s);
    line-height: 1.35;
}

.ad-quote-field input:focus,
.ad-quote-field select:focus {
    border-color: var(--accent);
    outline: 2px solid var(--focus);
    outline-offset: 1px;
}

.ad-quote-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    color: var(--muted);
    font-size: var(--fs-2xs);
    line-height: 1.45;
}

.ad-quote-consent input {
    flex: 0 0 auto;
    margin-top: 0.15rem;
}

@media (max-width: 34rem) {
    .ad-quote-grid {
        grid-template-columns: 1fr;
    }
}
