/**
 * WizV2 Quantity Modal — CSS
 *
 * Standalone modal for editing product quantities.
 * All styling via BEM classes — Elementor controls target these directly.
 */

/* ================================================================
   Body scroll lock — added/removed on body by JS
   ================================================================ */
body.wiz-qty-modal-body-locked {
    overflow: hidden;
}

/* ================================================================
   Overlay / Backdrop
   ================================================================ */
.wiz-qty-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.wiz-qty-modal--open {
    display: flex;
}

.wiz-qty-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* ================================================================
   Modal Content Box
   ================================================================ */
.wiz-qty-modal__content {
    position: relative;
    z-index: 1;
    width: 400px;
    max-width: 90vw;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

/* ================================================================
   Header
   ================================================================ */
.wiz-qty-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: 600;
    color: #222;
    padding: 12px 16px;
    border-bottom: 1px solid #eaeaea;
    position: relative;
}

.wiz-qty-modal__close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 26px;
    color: #888;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    transition: color 0.2s;
}

.wiz-qty-modal__close:hover {
    color: #333;
}

/* ================================================================
   Body
   ================================================================ */
.wiz-qty-modal__body {
    padding: 20px 16px;
}

.wiz-qty-modal__input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    -moz-appearance: textfield;
}

.wiz-qty-modal__input:focus {
    outline: none;
    border-color: #075465;
    box-shadow: 0 0 0 1px #075465;
}

/* Hide number input spinner arrows */
.wiz-qty-modal__input::-webkit-outer-spin-button,
.wiz-qty-modal__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ================================================================
   Validation Message
   ================================================================ */
.wiz-qty-modal__message {
    font-size: 13px;
    font-weight: 600;
    color: #e53e3e;
    margin-top: 4px;
    display: none;
}

/* ================================================================
   Suggestion Chip
   ================================================================ */
.wiz-qty-modal__suggestion {
    background: #f0f6ff;
    width: fit-content;
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: #4681e6;
    font-size: 13px;
    margin-top: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.wiz-qty-modal__suggestion:hover {
    background: #e0edff;
}

.wiz-qty-modal__suggestion svg {
    color: #4681e6;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.wiz-qty-modal__suggestion-text {
    flex: 1;
}

/* ================================================================
   Footer
   ================================================================ */
.wiz-qty-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid #eaeaea;
}

.wiz-qty-modal__cancel-btn,
.wiz-qty-modal__update-btn {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.wiz-qty-modal__cancel-btn {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
}

.wiz-qty-modal__update-btn {
    background: var(--primary);
    color: var(--primary-text);
}

.wiz-qty-modal__update-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.wiz-qty-modal__update-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ================================================================
   Mobile
   ================================================================ */
@media (max-width: 767px) {
    .wiz-qty-modal__content {
        width: 90vw;
    }
}
