/* Ewshopqorder - BEM methodology */

/* Block: ewshopqorder */

.ewshopqorder {
    --button-bg: var(--ewshopqorder-button-bg, #3b82f6);
    --button-color: var(--ewshopqorder-button-color, #ffffff);
    --form-button-bg: var(--ewshopqorder-form-button-bg, #3b82f6);
    --form-button-color: var(--ewshopqorder-form-button-color, #ffffff);
}

/* Modal */

.ewshopqorder__modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
}

.ewshopqorder__modal--open,
.ewshopqorder__modal--closing {
    display: block;
}

.ewshopqorder__modal-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100% - 3.5rem);
    margin: 0.75rem;
    transition: all 0.2s ease-in-out;
    transform: scale(0.95);
    opacity: 0;
}

.ewshopqorder__modal--open .ewshopqorder__modal-container {
    animation: ewshopqorder-zoom-in 0.3s ease-out forwards;
}

@keyframes ewshopqorder-zoom-in {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes ewshopqorder-zoom-out {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.8);
        opacity: 0;
    }
}

.ewshopqorder__modal--closing .ewshopqorder__modal-container {
    animation: ewshopqorder-zoom-out 0.2s ease-in forwards;
}

.ewshopqorder__backdrop--closing {
    animation: ewshopqorder-fade-out 0.2s ease-in forwards;
}

@keyframes ewshopqorder-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.ewshopqorder__modal-content {
    position: relative;
    width: 512px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

/* Backdrop */

.ewshopqorder__backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.5);
    z-index: 9998;
    display: none;
    transition: opacity 0.2s ease-in-out;
    opacity: 0;
}

.ewshopqorder__backdrop--open,
.ewshopqorder__backdrop--closing {
    display: block;
}

.ewshopqorder__backdrop--open {
    opacity: 1;
}

/* Close button */

.ewshopqorder__close {
    position: absolute;
    right: 15px;
    top: 15px;
}

.ewshopqorder__close-btn {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    border: none;
    background-color: #f5f5f5;
    color: #262626;
    cursor: pointer;
    transition: background-color 0.15s;
}

.ewshopqorder__close-btn:hover {
    background-color: #e5e5e5;
}

.ewshopqorder__close-btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Header */

.ewshopqorder__header {
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.5rem;
}

.ewshopqorder__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #262626;
    text-align: center;
    margin: 0;
}

.ewshopqorder__description {
    font-size: 1rem;
    color: #737373;
    text-align: center;
    margin: 0.5rem 0 0;
}

/* Product info */

.ewshopqorder__product {
    display: none;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.ewshopqorder__product--visible {
    display: flex;
}

.ewshopqorder__product-image {
    width: 64px;
    height: 64px;
    border-radius: 0.5rem;
    -o-object-fit: cover;
       object-fit: cover;
}

.ewshopqorder__product-name {
    font-size: 0.875rem;
    color: #171717;
}

/* Body */

.ewshopqorder__body {
    padding: 0 1.5rem 1.75rem;
    overflow-y: auto;
}

/* Form */

.ewshopqorder__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Field */

.ewshopqorder__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ewshopqorder__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #171717;
}

.ewshopqorder__input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #171717;
    background-color: #ffffff;
    border: 1px solid #d4d4d4;
    border-radius: 0.375rem;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.ewshopqorder__input:hover,
.ewshopqorder__input:focus {
    border-color: var(--form-button-bg);
}

.ewshopqorder__input::-moz-placeholder {
    color: #a3a3a3;
}

.ewshopqorder__input::placeholder {
    color: #a3a3a3;
}

.ewshopqorder__input--textarea {
    min-height: 80px;
    resize: vertical;
}

/* Checkbox field */

.ewshopqorder__checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ewshopqorder__checkbox {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    border: 1px solid #d4d4d4;
    border-radius: 0.25rem;
    cursor: pointer;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.ewshopqorder__checkbox:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox=%270 0 16 16%27 fill=%27white%27 xmlns=%27http://www.w3.org/2000/svg%27%3e%3cpath d=%27M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z%27/%3e%3c/svg%3e");
    background-color: var(--form-button-bg);
    border-color: var(--form-button-bg);
}

.ewshopqorder__checkbox-label {
    font-size: 0.875rem;
    color: #737373;
    cursor: pointer;
    -webkit-user-select: none;
       -moz-user-select: none;
            user-select: none;
}

.ewshopqorder__checkbox-label a {
    color: var(--form-button-bg);
    text-decoration: underline;
}

/* Error */

.ewshopqorder__error {
    font-size: 0.875rem;
    color: #ef4444;
    display: none;
}

.ewshopqorder__error--visible {
    display: block;
}

/* Captcha */

.ewshopqorder__captcha {
    margin-top: 0.5rem;
}

/* Submit button */

.ewshopqorder__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.625rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--form-button-color);
    background-color: var(--form-button-bg);
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: opacity 0.15s;
    margin-top: 0.5rem;
}

.ewshopqorder__submit:hover {
    opacity: 0.9;
}

.ewshopqorder__submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ewshopqorder__submit-spinner {
    display: none;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    animation: ewshopqorder-spin 1s linear infinite;
}

.ewshopqorder__submit--loading .ewshopqorder__submit-spinner {
    display: block;
}

@keyframes ewshopqorder-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Order button */

.ewshopqorder-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ewshopqorder-button-color);
    background-color: var(--ewshopqorder-button-bg);
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: opacity 0.15s;
}

.ewshopqorder-button:hover {
    opacity: 0.9;
}

.ewshopqorder-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Honeypot */

.ewshopqorder__honeypot {
    display: none;
}

/* Dark mode */

html.dark .ewshopqorder__modal-content,
html[data-theme="dark"] .ewshopqorder__modal-content,
html[data-bs-theme="dark"] .ewshopqorder__modal-content {
    background-color: #262626;
    border-color: #404040;
}

html.dark .ewshopqorder__backdrop,
html[data-theme="dark"] .ewshopqorder__backdrop,
html[data-bs-theme="dark"] .ewshopqorder__backdrop {
    background-color: rgba(17, 24, 39, 0.8);
}

html.dark .ewshopqorder__close-btn,
html[data-theme="dark"] .ewshopqorder__close-btn,
html[data-bs-theme="dark"] .ewshopqorder__close-btn {
    background-color: #404040;
    color: #a3a3a3;
}

html.dark .ewshopqorder__close-btn:hover,
html[data-theme="dark"] .ewshopqorder__close-btn:hover,
html[data-bs-theme="dark"] .ewshopqorder__close-btn:hover {
    background-color: #525252;
}

html.dark .ewshopqorder__title,
html[data-theme="dark"] .ewshopqorder__title,
html[data-bs-theme="dark"] .ewshopqorder__title {
    color: #ffffff;
}

html.dark .ewshopqorder__description,
html[data-theme="dark"] .ewshopqorder__description,
html[data-bs-theme="dark"] .ewshopqorder__description {
    color: #a3a3a3;
}

html.dark .ewshopqorder__product-name,
html[data-theme="dark"] .ewshopqorder__product-name,
html[data-bs-theme="dark"] .ewshopqorder__product-name {
    color: #ffffff;
}

html.dark .ewshopqorder__label,
html[data-theme="dark"] .ewshopqorder__label,
html[data-bs-theme="dark"] .ewshopqorder__label {
    color: #ffffff;
}

html.dark .ewshopqorder__input,
html[data-theme="dark"] .ewshopqorder__input,
html[data-bs-theme="dark"] .ewshopqorder__input {
    background-color: #404040;
    border-color: #525252;
    color: #ffffff;
}

html.dark .ewshopqorder__input::-moz-placeholder, html[data-theme="dark"] .ewshopqorder__input::-moz-placeholder, html[data-bs-theme="dark"] .ewshopqorder__input::-moz-placeholder {
    color: #737373;
}

html.dark .ewshopqorder__input::placeholder,
html[data-theme="dark"] .ewshopqorder__input::placeholder,
html[data-bs-theme="dark"] .ewshopqorder__input::placeholder {
    color: #737373;
}

html.dark .ewshopqorder__checkbox,
html[data-theme="dark"] .ewshopqorder__checkbox,
html[data-bs-theme="dark"] .ewshopqorder__checkbox {
    border-color: #525252;
}

html.dark .ewshopqorder__checkbox-label,
html[data-theme="dark"] .ewshopqorder__checkbox-label,
html[data-bs-theme="dark"] .ewshopqorder__checkbox-label {
    color: #a3a3a3;
}

html.dark .ewshopqorder__error,
html[data-theme="dark"] .ewshopqorder__error,
html[data-bs-theme="dark"] .ewshopqorder__error {
    color: #fca5a5;
}

/* Responsive */

@media (max-width: 640px) {
    .ewshopqorder__modal-content {
        width: 100%;
        margin: 0.5rem;
    }

    .ewshopqorder__header {
        padding: 1.25rem 1rem;
    }

    .ewshopqorder__body {
        padding: 0 1rem 1.25rem;
    }
}

