/**
 * Custom: Quick-quote icon replacing the unused WooCommerce cart shortcut.
 */

.kyo-header-quote-trigger {
    color: #0d2740 !important;
}

.kyo-header-quote-trigger .header-cart-icon,
.kyo-header-quote-trigger .cart-img-icon {
    pointer-events: none;
}

@media only screen and (min-width: 850px) {
    /* Custom: Visually balance the quote glyph with the adjacent hotline icon. */
    .kyo-header-quote-trigger .cart-img-icon {
        transform: translateY(2px) scale(1.09375);
        transform-origin: center;
    }
}

.kyo-header-quote-trigger:hover,
.kyo-header-quote-trigger:focus-visible {
    opacity: 0.78;
}

.kyo-header-quote-trigger:focus-visible {
    border-radius: 6px;
    outline: 2px solid #c7932e;
    outline-offset: 2px;
}

.kyo-header-quote-item #cart-popup {
    display: none !important;
}

/* Custom: Shared quote popup available from the header on every public page. */
body.kyo-quote-modal-open {
    overflow: hidden !important;
}

.kyo-quote-modal {
    position: fixed;
    inset: 0;
    z-index: 100100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
}

.kyo-quote-modal.is-open {
    display: flex;
}

.kyo-quote-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 24, 42, 0.72);
    backdrop-filter: blur(4px);
}

.kyo-quote-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: calc(100dvh - 32px);
    overflow: hidden;
    padding: 0;
    border-top: 3px solid #d4a137;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    box-shadow: 0 24px 70px rgba(5, 24, 42, 0.28);
}

.kyo-quote-modal__scroll {
    width: 100%;
    max-height: calc(100dvh - 35px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 30px;
    box-sizing: border-box;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.kyo-quote-modal .kyo-b2b-eyebrow {
    color: #a87417;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.kyo-quote-modal__dialog h2 {
    margin: 5px 42px 7px 0;
    color: #0d2740;
    font-size: 28px;
}

.kyo-quote-modal__scroll > p {
    margin-bottom: 18px;
    color: #526576;
}

.kyo-quote-modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    width: 38px;
    height: 38px;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px;
    max-height: 38px;
    margin: 0;
    padding: 0;
    border: 1px solid #d8e0e6;
    border-radius: 50%;
    background: #fff;
    color: #0d2740;
    font-size: 25px;
    line-height: 34px;
}

.kyo-quote-modal__close:hover,
.kyo-quote-modal__close:focus {
    border-color: #d4a137;
    background: #fff8e8;
    color: #0d2740;
}

.kyo-quote-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.kyo-quote-form__field,
.kyo-quote-form__field label {
    display: block;
    min-width: 0;
    margin: 0;
}

.kyo-quote-form__field--wide,
.kyo-quote-form__consent,
.kyo-quote-form__submit {
    grid-column: 1 / -1;
}

.kyo-quote-form label > span:first-child {
    display: block;
    margin-bottom: 6px;
    color: #1f3548;
    font-size: 13px;
    font-weight: 700;
}

.kyo-quote-form input:not([type="checkbox"]),
.kyo-quote-form textarea,
.kyo-quote-form select {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    margin: 0;
    border: 1px solid #cfd9e1;
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
}

.kyo-quote-form textarea {
    height: 84px;
    min-height: 84px;
    resize: vertical;
}

.kyo-quote-form input:focus,
.kyo-quote-form textarea:focus,
.kyo-quote-form select:focus {
    border-color: #d4a137;
    box-shadow: 0 0 0 3px rgba(212, 161, 55, 0.16);
}

.kyo-quote-form__consent {
    color: #5d6d7a;
    font-size: 13px;
    line-height: 1.5;
}

.kyo-quote-form__consent .wpcf7-list-item {
    margin: 0;
}

.kyo-quote-form__consent .wpcf7-list-item label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.kyo-quote-form__consent input[type="checkbox"] {
    flex: 0 0 auto;
    margin: 3px 0 0;
}

.kyo-quote-form__submit input[type="submit"] {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    border: 1px solid #d4a137 !important;
    border-radius: 6px;
    background: #d4a137 !important;
    color: #0d2740 !important;
    font-weight: 800;
    opacity: 1 !important;
    cursor: pointer !important;
    text-shadow: none;
}

.kyo-quote-form__submit input[type="submit"]:hover,
.kyo-quote-form__submit input[type="submit"]:focus {
    border-color: #0d2740 !important;
    background: #0d2740 !important;
    color: #fff !important;
}

.kyo-quote-form .wpcf7-spinner {
    vertical-align: middle;
}

.kyo-quote-form .wpcf7-not-valid-tip {
    margin-top: 4px;
    font-size: 12px;
}

.kyo-quote-form .wpcf7-response-output {
    grid-column: 1 / -1;
    margin: 4px 0 0 !important;
    border-radius: 6px;
}

@media only screen and (max-height: 760px) and (min-width: 550px) {
    .kyo-quote-modal__scroll {
        padding: 22px 26px;
    }

    .kyo-quote-modal__dialog h2 {
        font-size: 26px;
    }

    .kyo-quote-modal__scroll > p {
        margin-bottom: 12px;
    }

    .kyo-quote-form {
        gap: 9px 14px;
    }

    .kyo-quote-form input:not([type="checkbox"]),
    .kyo-quote-form textarea,
    .kyo-quote-form select {
        min-height: 42px;
    }

    .kyo-quote-form textarea {
        height: 68px;
        min-height: 68px;
    }
}

@media only screen and (max-width: 549px) {
    .kyo-quote-modal {
        align-items: flex-end;
        padding: 0;
    }

    .kyo-quote-modal__dialog {
        width: 100%;
        max-height: 92vh;
        border-radius: 12px 12px 0 0;
    }

    .kyo-quote-modal__scroll {
        max-height: 92vh;
        padding: 26px 18px calc(24px + env(safe-area-inset-bottom));
    }

    .kyo-quote-modal__dialog h2 {
        font-size: 25px;
    }

    .kyo-quote-form {
        grid-template-columns: 1fr;
    }

    .kyo-quote-form__field,
    .kyo-quote-form__field--wide,
    .kyo-quote-form__consent,
    .kyo-quote-form__submit {
        grid-column: 1;
    }

    .kyo-quote-form textarea {
        height: 72px;
        min-height: 72px;
    }
}
