/* WooCommerce Stock Notifications — Frontend v3 */

/* === Кнопка на странице товара === */
.wsn-btn-wrap {
    margin: 10px 0;
}

.wsn-notify-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 0;
    background-color: #b89b75;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s;
    -webkit-appearance: none;
}

.wsn-notify-btn:hover {
    background-color: #a68a64;
}

/* === Оверлей === */
.wsn-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wsn-overlay.wsn-active {
    display: flex;
}

/* === Модалка === */
.wsn-modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 32px 28px 28px;
    animation: wsn-fade-in 0.25s ease;
}

@keyframes wsn-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.wsn-modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 14px !important;
    left: auto !important;
    float: none !important;
    background: none !important;
    border: none !important;
    font-size: 28px !important;
    color: #999 !important;
    cursor: pointer !important;
    line-height: 1 !important;
    padding: 4px 8px !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    z-index: 2;
    text-align: right !important;
}

.wsn-modal-close:hover {
    color: #333 !important;
}

.wsn-modal-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.wsn-modal-desc {
    margin: 0 0 20px;
    font-size: 13px;
    color: #888;
    line-height: 1.5;
}

.wsn-modal-field {
    margin-bottom: 14px;
}

.wsn-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 0;
    background: #fff;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.wsn-input:focus {
    border-color: #000;
}

.wsn-input.wsn-input-error {
    border-color: #c00;
}

.wsn-input::placeholder {
    color: #aaa;
}

.wsn-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #777;
    line-height: 1.4;
}

.wsn-consent-checkbox {
    margin-top: 1px;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    accent-color: #b89b75;
    cursor: pointer;
}

.wsn-modal-submit {
    display: block;
    width: 100%;
    padding: 13px 20px;
    margin-top: 18px;
    border: none;
    border-radius: 0;
    background-color: #b89b75;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s;
    -webkit-appearance: none;
}

.wsn-modal-submit:hover {
    background-color: #a68a64;
}

.wsn-modal-submit:disabled,
.wsn-modal-submit.wsn-btn-loading {
    opacity: 0.6;
    cursor: not-allowed;
}

.wsn-message {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.4;
}

.wsn-msg-success {
    background: #f0f8f0;
    border: 1px solid #c3dfc3;
    color: #2d6a2d;
}

.wsn-msg-error {
    background: #fef0f0;
    border: 1px solid #f0c3c3;
    color: #c00;
}

/* === Мобилка === */
@media (max-width: 480px) {
    .wsn-overlay {
        padding: 16px;
    }

    .wsn-modal {
        padding: 28px 20px 22px;
    }

    .wsn-modal-title {
        font-size: 15px;
    }
}
