.to-order-plugin__overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    z-index: 1200;
}

.to-order-plugin__overlay[hidden] {
    display: none !important;
}

.to-order-plugin__modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1201;
}

.to-order-plugin__modal[hidden] {
    display: none !important;
}

.to-order-plugin__dialog {
    width: min(720px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    position: relative;
}

.to-order-plugin__close {
    position: absolute;
    top: 10px;
    right: 14px;
    border: 0;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
}

.to-order-plugin__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.to-order-plugin__product {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.to-order-plugin__product-image-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.to-order-plugin__product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.to-order-plugin__product-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.to-order-plugin__product-meta a {
    font-size: 18px;
    font-weight: 600;
}

.to-order-plugin__product-price {
    font-weight: 600;
}

.to-order-plugin__form {
    display: grid;
    gap: 14px;
}

.to-order-plugin__form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.to-order-plugin__form input,
.to-order-plugin__form textarea {
    width: 100%;
}

.to-order-plugin__form input.to-order-plugin__field-error,
.to-order-plugin__form textarea.to-order-plugin__field-error,
.to-order-plugin__agreement.to-order-plugin__field-error {
    outline: 1px solid #dc2626;
}

.to-order-plugin__required::after {
    content: ' *';
    color: #dc2626;
}

.to-order-plugin__agreement {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    align-items: flex-start;
    font-size: 14px;
}

.to-order-plugin__error,
.to-order-plugin__success {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
}

.to-order-plugin__error {
    background: #fee2e2;
    color: #991b1b;
}

.to-order-plugin__success {
    background: #dcfce7;
    color: #166534;
}

.to-order-plugin__actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.to-order-plugin__loading {
    font-size: 14px;
    color: #4b5563;
}

.to-order-plugin__actions .default-btn[disabled] {
    opacity: 0.65;
    cursor: wait;
}

[data-to-order-wrapper][hidden] {
    display: none !important;
}

.wrapper-to-order {
    margin: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

.product-page__buy-buttons .wrapper-to-order {
    align-self: center;
}

@media (max-width: 767px) {
    .to-order-plugin__modal {
        padding: 12px;
    }

    .to-order-plugin__dialog {
        padding: 18px;
    }

    .to-order-plugin__product {
        grid-template-columns: 1fr;
    }
}
