/* Contact / book-a-demo page. Everything on the theme tokens, so it follows the light/dark switch. */

.contact-card {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 18px;
    padding: 2rem;
}

/* Bootstrap's field styling assumes a white page; on dark it would paint white boxes.
   background-color, never the `background` shorthand: the shorthand also resets background-repeat,
   -position and -size, which is what positions the select's dropdown arrow - lose those and the
   arrow tiles across the whole field. */
.contact-card .form-control,
.contact-card .form-select {
    background-color: var(--bg);
    border: 1px solid var(--hairline);
    color: var(--fg);
}

    .contact-card .form-control:focus,
    .contact-card .form-select:focus {
        background-color: var(--bg);
        color: var(--fg);
        border-color: rgba(var(--tint-rgb), 0.6);
        box-shadow: 0 0 0 0.2rem rgba(var(--tint-rgb), 0.15);
    }

    .contact-card .form-control::placeholder {
        color: var(--fg-faint);
    }

/* the select's own arrow is a dark svg; --icon-invert repaints it per theme, as elsewhere */
.contact-card .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    filter: none;
}

:root[data-theme="dark"] .contact-card .form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23eaf7f2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.contact-card .form-label {
    color: var(--fg-dim);
    font-weight: 500;
}

/* the browser's own "please fill this in" outline, in the theme's colours */
.contact-card .form-control:invalid:not(:placeholder-shown),
.contact-card .form-select:invalid:not(:focus) {
    border-color: rgba(255, 86, 102, 0.55);
}

.contact-card .alert-danger {
    background: rgba(255, 86, 102, 0.12);
    border: 1px solid rgba(255, 86, 102, 0.4);
    color: var(--accent-warn);
}

/* ---------- thank-you ---------- */

.contact-done {
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 18px;
    padding: 3rem 2rem;
}

    /* direct child only: the button inside this panel has an icon of its own */
    .contact-done > .bi {
        display: block;
        font-size: 3.5rem;
        line-height: 1;
        color: var(--accent);
        margin-bottom: 1.25rem;
    }

@media (max-width: 575.98px) {
    .contact-card {
        padding: 1.25rem;
    }
}

/* ---------- offices ---------- */

/* same panel treatment as the form card, so the two read as one column */
.office-card {
    background: var(--surface);
    border: 1px solid var(--hairline);
    border-radius: 18px;
    padding: 1.5rem;
}

/* address defaults to italic in every browser - straighten it and keep the lines airy */
.office-address {
    font-style: normal;
    line-height: 1.7;
    color: var(--fg-dim);
}
