.out-of-stock-inquiry-modal .modal-dialog {
    width: min(650px, calc(100% - 32px));
    max-width: 650px;
    margin: 16px auto;
}

.out-of-stock-inquiry-modal .modal-content {
    position: relative;
    max-height: calc(100dvh - 32px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 30px;
    border: 1px solid rgba(180, 34, 49, 0.12);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(36, 19, 20, 0.22);
    overscroll-behavior: contain;
}

.out-of-stock-inquiry-modal .modal-content::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, #a90f2a, #c12b3d 55%, #e7b75d);
    content: "";
}

.out-of-stock-modal-close {
    position: absolute;
    z-index: 2;
    top: 17px;
    right: 17px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #f0e4df;
    border-radius: 50%;
    background: #fff;
    color: #6b5a58;
    font-size: 21px;
    box-shadow: 0 4px 14px rgba(48, 29, 27, 0.08);
}

.out-of-stock-modal-close:hover {
    border-color: #b42231;
    color: #b42231;
}

.out-of-stock-modal-heading {
    display: flex;
    align-items: center;
    gap: 17px;
    padding: 2px 45px 22px 0;
    text-align: left;
}

.out-of-stock-modal-icon {
    display: inline-grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border: 1px solid #f2d9d4;
    border-radius: 18px;
    background: linear-gradient(145deg, #fff3e9, #fff8f3);
    color: #b42231;
    font-size: 27px;
}

.out-of-stock-heading-copy {
    min-width: 0;
}

.out-of-stock-eyebrow {
    margin: 0 0 4px;
    color: #b42231;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.out-of-stock-modal-heading h2 {
    margin: 0;
    color: #271d1c;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.out-of-stock-description {
    max-width: 470px;
    margin: 5px 0 0;
    color: #786e6c;
    font-size: 13px;
    line-height: 1.45;
}

.out-of-stock-product-summary {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
    padding: 13px 15px;
    border: 1px solid #f1e2d7;
    border-radius: 14px;
    background: linear-gradient(110deg, #fff8f0, #fffaf6);
}

.out-of-stock-product-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 13px;
    background: #f7e8e3;
    color: #ad1b30;
    font-size: 22px;
}

.out-of-stock-product-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

.out-of-stock-product-label {
    color: #a37f73;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.out-of-stock-product-summary strong {
    overflow: hidden;
    color: #302523;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.out-of-stock-variation-label {
    color: #817774;
    font-size: 12px;
}

.out-of-stock-inquiry-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 13px 15px;
}

.out-of-stock-field:nth-of-type(3) {
    grid-column: 1 / -1;
}

.out-of-stock-field label {
    display: block;
    margin-bottom: 6px;
    color: #352b29;
    font-size: 12px;
    font-weight: 600;
}

.out-of-stock-field input,
.out-of-stock-field textarea {
    display: block;
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #e8ddd8;
    border-radius: 10px;
    outline: none;
    background: #fffefd;
    color: #292321;
    font: inherit;
    font-size: 13px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.out-of-stock-field input {
    height: 46px;
}

.out-of-stock-field textarea {
    min-height: 88px;
    resize: vertical;
}

.out-of-stock-field input:focus,
.out-of-stock-field textarea:focus {
    border-color: #b42231;
    box-shadow: 0 0 0 3px rgba(180, 34, 49, 0.1);
}

.out-of-stock-field-error {
    display: block;
    margin-top: 4px;
    color: #b42231;
    font-size: 12px;
}

.out-of-stock-submit-button {
    display: flex;
    min-height: 48px;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 11px;
    background: #b42231;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(180, 34, 49, 0.18);
    transition: background 160ms ease, transform 160ms ease;
}

.out-of-stock-submit-button:hover {
    transform: translateY(-1px);
    background: #991729;
}

.out-of-stock-submit-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.out-of-stock-form-feedback {
    grid-column: 1 / -1;
    margin: 0;
    color: #287a42;
    font-size: 13px;
    text-align: center;
}

@media (max-height: 767px) {
    .out-of-stock-inquiry-modal .modal-content {
        max-height: 100vh;
        border-radius: 0;
        padding: 15px 15px;
        height: 100vh;
        justify-content: center;
    }
    #out-of-stock-inquiry-modal .modal-dialog.modal-dialog-centered {
        margin: 0;
        width: 100%;
        border-radius: 0;
    }
    .out-of-stock-inquiry-modal .modal-content::before {
        opacity: 0;
    }
    .out-of-stock-modal-close {
        top: 7px;
        right: 7px;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }
    .out-of-stock-modal-heading {
        padding: 0;
    }
    .out-of-stock-modal-icon {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border-radius: 10px;
        font-size: 22px;
    }
    .out-of-stock-modal-heading h2 {
        font-size: 18px;
        margin: 0;
        line-height: 1.2;
    }
    .out-of-stock-eyebrow {
        margin: 0 0 0px;
    }
    .out-of-stock-description {
        font-size: 12px;
        margin-top: 7px;
    }
    .out-of-stock-product-summary {
        margin-top: 15px;
        padding: 10px 12px;
    }
    .out-of-stock-product-label {
        line-height: normal;
    }
    .out-of-stock-variation-label {
        line-height: normal;
    }
    .out-of-stock-inquiry-form {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    .out-of-stock-submit-button {
        margin-top: 10px;
    }
}