/**
 * Header "Send message" button
 * Sits in the same row, right after the main menu items,
 * and anchors to the footer contact form (#footer_form).
*/
html {
    scroll-behavior: smooth;
}

#main-nav .menu-item--send-message {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

#main-nav .sb-send-message-btn {
    display: inline-block;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
    color: #fff;
    background-color: #dc7928;
    padding: 12px 24px;
    border-radius: 8px;
    white-space: nowrap;
    transition: background-color .3s;
}

#main-nav .sb-send-message-btn:hover,
#main-nav .sb-send-message-btn:focus {
    color: #fff;
    background-color: #4b666e;
}

.sb-form_title:empty,
.sb-form_description:empty{
    display: none;
}

.sb-form_fields {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 30px;
}

.sb-form_label {
    display: none;
}

/**
 * Footer form layout
 * Full-width section, two equal columns:
 * left  -> title + description
 * right -> the form controls
*/
.sb-form_container {
    position: relative;
    padding: 60px 15px;
    background-color: #4b666e;
    /* full-width background image — put the URL here */
    background-image: url('/wp-content/themes/sb-child/img/footer-form.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* color tint over the image (replaces the old .fade-color span) */
.sb-form_container:before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: #e8e8e8;
    opacity: .85;
    z-index: 1;
}

.sb-form_info,
.sb-form {
    position: relative;
    z-index: 2;
    max-width: 1170px;
    margin: 0 auto;
}

.sb-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 60px;
    align-items: start;
}

/* left column */
.sb-form_title,
.sb-form_description {
    grid-column: 1;
}
.sb-form_title {
    grid-row: 1;
    font-size: 2rem;
    line-height: 1.25;
    text-transform: uppercase;
    margin: 0 0 20px;
}
.sb-form_description {
    grid-row: 2;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* right column */
.sb-form_fields {
    grid-column: 2;
    grid-row: 1 / span 2;
}
.sb-form_btn {
    grid-column: 2;
    margin-top: 20px;
    justify-self: start;
}

/* name + e-mail share one row (30px column gap -> 15px each) */
.sb-form_fields .sb-form_block:nth-child(1),
.sb-form_fields .sb-form_block:nth-child(2) {
    width: calc(50% - 15px);
}

@media (max-width: 768px) {
    .sb-form {
        grid-template-columns: 1fr;
    }
    .sb-form_title,
    .sb-form_description,
    .sb-form_fields,
    .sb-form_btn {
        grid-column: 1;
    }
    .sb-form_description{
        margin-bottom: 20px;
    }
    .sb-form_fields {
        grid-row: auto;
    }
    .sb-form_fields .sb-form_block:nth-child(1),
    .sb-form_fields .sb-form_block:nth-child(2) {
        width: 100%;
    }
}

.sb-form_block {
    width: 100%;
    color: #4b666e;
    /*backdrop-filter: blur(7px);*/
    /*z-index: 2;*/
}

.sb-form_block input,
.sb-form_block textarea,
.sb-form_block .choices__inner {
    font-size: 16px;
    line-height: 1;
    color: #4b666e;
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 20px;
    padding: 20px 30px;
    border-radius: 8px;
    background-color: rgba(255,255,255, .8);
    border: 1px solid transparent;
    transition: border;
    transition-duration: .3s;
}

.sb-form_block input:hover,
.sb-form_block input:focus,
.sb-form_block textarea:hover,
.sb-form_block textarea:focus,
.sb-form_block .choices__inner:hover,
.sb-form_block .choices__inner:focus {
    border-color: #4b666e;
}

.sb-form_block textarea {
    min-height: 100px;
    max-height: 150px;
}

.sb-form_block input::placeholder,
.sb-form_block textarea::placeholder {
    color: #4b666e;
    font-size: 16px;
}

@media (max-width: 450px) {
    .sb-form_block input,
    .sb-form_block textarea,
    .sb-form_block .choices__inner {
        padding: 16px 20px;
    }
}

/**/

.sb-form_block__error {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sb-form_success {
    text-align: center;
    font-size: 24px;
    color: #4b666e;
}

/**/

.choices[data-type*=select-one] .choices__inner {
    padding-bottom: 16px;
}
.choices__list--dropdown,
.choices__list[aria-expanded] {
    margin-top: 0;
}
.choices[data-type*=select-one]::after {
    font-family: 'fontello';
    content: '\e816';
    width: auto;
    height: auto;
    border: none;
    margin-top: -12.5px;
    right: 20px;
}

.choices__list--single {
    padding: 2px 16px 3px 0;
}

.choices__list.choices__list--dropdown {
    background-color: #fff;
    color: #4b666e;
}

.choices.is-open .choices__inner {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.choices[data-type*=select-one].is-open::after{
    margin-top: -12.5px;
    transform: rotate(180deg);
}

.choices > .choices__list {
    background-color: #e8e8e8;
}
.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list[aria-expanded] .choices__item--selectable.is-highlighted {
    background-color: #fff;
}

.sb-form_btn {
    display: block;
    width: 100%;
    padding: 22px;
    margin-top: 40px;
    background: #dc7928;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color .3s ease;
}

.sb-form_btn:hover {
    background: #4b666e;
}

.sb-form_btn:focus-visible {
    outline: 2px solid #dc7928;
    outline-offset: 2px;
}