/* =========================================================
   WC Stock Notifier – Front-end Styles
   ========================================================= */

/* ── Single product inline form ── */
.wcsn-notify-wrap {
   margin: 16px 0 0;
    padding: 18px 20px;
    background: #e8f0e9;
    border: 1px solid #2a5a3f;
    border-radius: 10px;
}
.wcsn-label { margin: 0 0 12px; font-size: 14px; color: #1a1a1a; }
.wcsn-form  { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wcsn-email-input, .wcsn-modal-field input[type="email"] {
	width: 100%;
    color: #1a1a1a;
    appearance: none;
    padding: 12px 16px;
    border: 1px solid #e8e6e3;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
	flex: 1 1 220px;
}
.wcsn-email-input:focus, .wcsn-modal-field input[type="email"]:focus {
	outline: none; border-color: #008a20;
}
.woocommerce .wcsn-submit-btn.button.alt, .woocommerce .wcsn-modal-submit.button.alt {
	flex-shrink: 0;
	margin: 0;
    outline: unset;
    background: #1a3a2a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s;
    line-height: normal;
}
.woocommerce .wcsn-submit-btn.button.alt:hover, .woocommerce .wcsn-modal-submit.button.alt:hover {
	background: #2a5a3f;
    color: #fff;
	cursor: pointer;
}
.wcsn-message { margin-top: 10px; padding: 10px 14px; border-radius: 4px; font-size: 13px; line-height: 1.5; }
.wcsn-message.wcsn-success { background: #edf7ed; color: #1e6f1e; border: 1px solid #b5ddb5; }
.wcsn-message.wcsn-error   { background: #fdecea; color: #8c1d18; border: 1px solid #f5b8b4; }
.wcsn-submit-btn.wcsn-loading { opacity: .65; cursor: not-allowed; pointer-events: none; }

/* ── Shop loop Notify Me button ── */
.wcsn-notify-btn {
    display: block;
    width: 100%;
    margin-top: 6px !important;
    background: transparent !important;
    color: #333 !important;
    border: 1.5px solid #ccc !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: .02em;
    transition: border-color .2s, color .2s, background .2s !important;
}
.wcsn-notify-btn:hover {
    background: #333 !important;
    color: #fff !important;
    border-color: #333 !important;
}

/* ── Modal overlay ── */
.wcsn-overlay {
    position: fixed; inset: 0; z-index: 999998;
    background: rgba(0,0,0,.55);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    animation: wcsn-fade-in .18s ease;
}
.wcsn-overlay[hidden] { display: none; }

@keyframes wcsn-fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes wcsn-slide-up { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ── Modal box ── */
.wcsn-modal {
    position: relative;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0,0,0,.22);
    width: 100%; max-width: 440px;
    padding: 0;
    overflow: hidden;
    animation: wcsn-slide-up .22s cubic-bezier(.34,1.56,.64,1);
}

.wcsn-modal-inner { padding: 36px 36px 32px; }

/* ── Close button ── */
.wcsn-modal-close {
    position: absolute; top: 14px; right: 16px;
    background: none; border: none; cursor: pointer;
    font-size: 17px; color: #aaa; line-height: 1; padding: 4px;
    transition: color .15s;
}
.wcsn-modal-close:hover { color: #333; }

/* ── Product preview strip ── */
.wcsn-modal-product {
    display: flex; align-items: center; gap: 12px;
    background: #f7f7f8; border-radius: 8px;
    padding: 10px 14px; margin-bottom: 20px;
}
.wcsn-modal-product img {
    width: 48px; height: 48px; object-fit: cover;
    border-radius: 6px; border: 1px solid #e5e5e5;
    flex-shrink: 0;
}
#wcsn-modal-product-name { font-size: 13px; font-weight: 600; color: #333; line-height: 1.4; }

/* ── Headings ── */
.wcsn-modal-title {
    margin: 0 0 8px; font-size: 20px; font-weight: 700;
    color: #1a1a2e; line-height: 1.25;
}
.wcsn-modal-subtitle { margin: 0 0 22px; font-size: 14px; color: #666; line-height: 1.55; }

/* ── Form ── */
.wcsn-modal-field { margin-bottom: 12px; }
/*.wcsn-modal-field input[type="email"] {
    width: 100%; box-sizing: border-box;
    padding: 13px 16px; font-size: 15px;
    border: 1.5px solid #ddd; border-radius: 8px;
    transition: border-color .2s, box-shadow .2s;
    background: #fafafa;
}
.wcsn-modal-field input[type="email"]:focus {
    outline: none; border-color: #333;
    box-shadow: 0 0 0 3px rgba(0,0,0,.07);
    background: #fff;
}*/
.wcsn-modal-field input.wcsn-input-error { border-color: #e03; }

/*.wcsn-modal-submit {
    width: 100%; padding: 14px !important; font-size: 15px !important;
    font-weight: 600 !important; border-radius: 8px !important;
    cursor: pointer; letter-spacing: .02em;
    transition: opacity .15s, transform .1s !important;
}
.wcsn-modal-submit:active  { transform: scale(.98); }*/
.wcsn-modal-submit.wcsn-loading { opacity: .65; pointer-events: none; }

/* ── Messages ── */
.wcsn-modal-message {
    margin-top: 14px; padding: 12px 16px;
    border-radius: 8px; font-size: 14px; line-height: 1.5; text-align: center;
}
.wcsn-modal-message[hidden] { display: none; }
.wcsn-modal-message.wcsn-success {
    background: #edf7ed; color: #1e6f1e; border: 1px solid #b5ddb5;
}
.wcsn-modal-message.wcsn-error {
    background: #fdecea; color: #8c1d18; border: 1px solid #f5b8b4;
}

/* ── Admin shop badge ── */
.wcsn-shop-badge {
    display: inline-flex; align-items: center; gap: 4px;
    margin: 4px 0 0; padding: 3px 9px;
    background: #2271b1; color: #fff !important;
    font-size: 11px; font-weight: 600;
    border-radius: 20px; text-decoration: none; line-height: 1.6;
}
.wcsn-shop-badge:hover { background: #135e96; color: #fff !important; }

/* ── Visually-disabled OOS buttons (disabled attr removed by JS so clicks work) ── */
.wcsn-oos-trigger, .out-stock-btn[aria-disabled="true"], .add-to-cart-btn-no-stock[aria-disabled="true"] {
    opacity: .6;
    cursor: pointer !important; /* show pointer so users know it's clickable */
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .wcsn-modal-inner { padding: 28px 22px 24px; }
    .wcsn-modal-title { font-size: 18px; }
}
