.preorder-modal {
    position: fixed;
    inset: 0;
    z-index: 200010;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.preorder-modal.is-open {
    display: flex;
}

.preorder-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.preorder-modal__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 600px;
    background: #fff;
    border-radius: 4px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-sizing: border-box;
}

.preorder-modal__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.preorder-modal__spacer {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.preorder-modal__title {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 24px;
    line-height: 30px;
    font-weight: 700;
    color: #000;
}

.preorder-modal__close {
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 0;
}

.preorder-modal__close img {
    display: block;
    width: 30px;
    height: 30px;
}

.preorder-modal__product {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    width: 100%;
}

.preorder-modal__image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    overflow: hidden;
}

.preorder-modal__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preorder-modal__name {
    flex: 1;
    padding-top: 6px;
    font-size: 16px;
    line-height: 22.5px;
    font-weight: 600;
    color: #000;
}

.preorder-modal__fields {
    display: flex;
    gap: 8px;
    width: 100%;
}

.preorder-modal__input {
    flex: 1;
    min-width: 0;
    height: 40px;
    border: 1px solid #c3c3c3;
    border-radius: 4px;
    padding: 8px 8px 8px 16px;
    font-size: 15px;
    line-height: 25.5px;
    font-weight: 500;
    color: #000;
    background: #fff;
    outline: none;
    box-sizing: border-box;
}

.preorder-modal__input::placeholder {
    color: #818181;
}

.preorder-modal__input.is-error {
    border-color: #e14b4b;
}

.preorder-modal__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.preorder-modal__submit {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 4px;
    background: #015780;
    color: #fff;
    font-size: 16px;
    line-height: 25.5px;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 16px;
}

.preorder-modal__submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.preorder-modal__error {
    color: #e14b4b;
    font-size: 14px;
    line-height: 1.4;
}

.preorder-modal__success {
    padding: 16px 0 8px;
    text-align: center;
}

.preorder-modal__success-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    color: #000;
}

body.preorder-modal-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .preorder-modal {
        align-items: flex-end;
        padding: 0;
    }

    .preorder-modal__dialog {
        max-width: none;
        border-radius: 3px 3px 0 0;
        padding: 10px 10px 8px;
    }

    .preorder-modal__title {
        font-size: 22px;
        color: #212529;
    }

    .preorder-modal__fields {
        flex-direction: column;
    }

    .preorder-modal__input {
        width: 100%;
    }

    .preorder-modal__submit {
        height: 50px;
    }
}
