/*
 * page-contact.css — rules used only on the Contact page (page-contact.php).
 * The enquiry form's field markup is described in docs/contact-form.md.
 */

/* Top of page: the heading breaks after "Our", as in the design. */
.fdfs-page-hero__heading {
    max-width: 620px;
}

/* ------------------------------------------------------------------------
 * Form card left, contact card right
 * --------------------------------------------------------------------- */

/* Slightly less space above and below the cards than other sections, as in the design. */
.fdfs-contact {
    padding-block: calc(var(--fdfs-section-space) - 2px);
}

.fdfs-contact__grid {
    display: grid;
    grid-template-columns: minmax(0, 772fr) minmax(0, 533fr);
    align-items: start;
    column-gap: 66px;
}

/* Stays in the right-hand column even before the form is set up. */
.fdfs-contact-details {
    grid-column: 2;
}

.fdfs-form-card,
.fdfs-contact-details {
    padding: 41px;
    background: var(--fdfs-white);
    border: 1px solid var(--fdfs-line);
}

/* ------------------------------------------------------------------------
 * Enquiry form
 * --------------------------------------------------------------------- */

.fdfs-form-card__heading {
    margin-top: 20px;
    color: var(--fdfs-black);
    font-family: var(--fdfs-font-heading);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.2;
}

.fdfs-form-card__form {
    margin-top: 35px;
}

.fdfs-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px;
}

.fdfs-form__field {
    margin: 0;
}

.fdfs-form__field--wide {
    grid-column: 1 / -1;
}

.fdfs-form__field--upload {
    margin-top: 7px;
}

.fdfs-form .fdfs-form__field--upload label {
    margin-bottom: 8px;
}

.fdfs-form label {
    display: block;
    margin-bottom: 9px;
    color: var(--fdfs-text-strong);
    font-family: var(--fdfs-font-mono);
    font-size: 0.7rem;
    line-height: 1.4;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Contact Form 7 wraps each control in an inline span. */
.fdfs-form .wpcf7-form-control-wrap {
    display: block;
}

.fdfs-form input:where([type="text"], [type="email"], [type="tel"], [type="date"], [type="number"], [type="url"]),
.fdfs-form select,
.fdfs-form textarea {
    display: block;
    width: 100%;
    height: 47px;
    padding: 0 16px;
    border: 1px solid #dcdbd7;
    border-radius: 0;
    background-color: var(--fdfs-white);
    color: var(--fdfs-black);
    font-size: var(--fdfs-size-card-text);
    line-height: 1.4;
}

.fdfs-form textarea {
    height: 150px;
    padding-block: 12px;
    resize: vertical;
}

.fdfs-form select {
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e0e10' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 14px;
    appearance: none;
}

/* Upload: a dashed box with a paperclip and the accepted file types.
   forms.js adds .is-enhanced and shows the chosen file names in the text;
   without JavaScript the browser's own file control shows instead. */
.fdfs-form__upload {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 73px;
    padding: 14px 16px 18px;
    border: 1px dashed #d4d3cf;
    background: var(--fdfs-surface);
    color: var(--fdfs-text);
    font-size: var(--fdfs-size-card-text);
    line-height: 1.5;
}

.fdfs-form__upload::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    background: var(--fdfs-red);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48'/%3E%3C/svg%3E") center / contain no-repeat;
}

.fdfs-form__upload input[type="file"] {
    max-width: 100%;
}

.fdfs-form__upload-text {
    display: none;
}

.fdfs-form__upload.is-enhanced input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.fdfs-form__upload.is-enhanced .wpcf7-form-control-wrap {
    display: contents;
}

.fdfs-form__upload.is-enhanced .fdfs-form__upload-text {
    display: block;
}

.fdfs-form__upload.is-enhanced:focus-within {
    outline: 2px solid var(--fdfs-red);
    outline-offset: 3px;
}

.fdfs-form__actions {
    margin: 36px 0 0;
}

.fdfs-form [type="submit"] {
    display: inline-flex;
    align-items: center;
    min-height: 53px;
    padding: 0 23px;
    border: 0;
    border-radius: 2px;
    background: var(--fdfs-red);
    color: var(--fdfs-white);
    font-family: var(--fdfs-font-body);
    font-size: var(--fdfs-size-small);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.fdfs-form [type="submit"]:hover {
    background: var(--fdfs-red-dark);
}

/* Messages from the form plugin. */
.fdfs-form .wpcf7-not-valid-tip {
    display: block;
    margin-top: 6px;
    color: var(--fdfs-red);
    font-size: var(--fdfs-size-small);
}

.fdfs-form-card .wpcf7-response-output {
    margin: 24px 0 0;
    padding: 12px 16px;
    font-size: var(--fdfs-size-small);
}

/* ------------------------------------------------------------------------
 * Direct contact card
 * --------------------------------------------------------------------- */

.fdfs-contact-details__list {
    margin-top: 36px;
}

/* Icon left; label and value stacked to its right. */
.fdfs-contact-details__item {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    column-gap: 18px;
}

.fdfs-contact-details__item + .fdfs-contact-details__item {
    margin-top: 33px;
}

.fdfs-contact-details__icon {
    grid-row: 1 / span 2;
    width: 20px;
    height: 20px;
    margin-top: 3px;
    color: var(--fdfs-red);
}

.fdfs-contact-details__label {
    color: #595856;
    font-family: var(--fdfs-font-mono);
    font-size: 0.7rem;
    line-height: 1.4;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.fdfs-contact-details__phone {
    margin-top: 8px;
    color: var(--fdfs-black);
    font-family: var(--fdfs-font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.fdfs-contact-details__value {
    margin-top: 7px;
    font-size: var(--fdfs-size-card-text);
    font-style: normal;
    line-height: 1.65;
}

.fdfs-contact-details__phone:hover,
a.fdfs-contact-details__value:hover {
    color: var(--fdfs-red);
}

.fdfs-contact-details__note {
    margin-top: 40px;
    padding-top: 33px;
    border-top: 1px solid var(--fdfs-line);
}

.fdfs-contact-details__note + .fdfs-contact-details__note {
    margin-top: 33px;
}

.fdfs-contact-details__text {
    margin-top: 12px;
    font-size: var(--fdfs-size-card-text);
    line-height: 1.65;
}

/* ------------------------------------------------------------------------
 * Smaller screens
 * --------------------------------------------------------------------- */

@media (max-width: 1023px) {
    .fdfs-contact__grid {
        grid-template-columns: 1fr;
        row-gap: 40px;
    }

    .fdfs-contact-details {
        grid-column: auto;
    }
}

@media (max-width: 639px) {
    .fdfs-form-card,
    .fdfs-contact-details {
        padding: 24px;
    }

    .fdfs-form__grid {
        grid-template-columns: 1fr;
    }
}
