/* =============================================
   Newsletter / Notification Popup
   Global neutral design — not jewelry-branded
   ============================================= */

/* Overlay */
.nl-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nl-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Container */
.nl-popup {
    background: #fff;
    border-radius: 16px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.nl-popup-overlay.active .nl-popup {
    transform: translateY(0);
}

/* Close button */
.nl-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: background 0.2s, color 0.2s;
    z-index: 1;
}

.nl-popup-close:hover {
    background: #e8e8e8;
    color: #333;
}

/* Steps */
.nl-popup-step {
    padding: 32px 28px;
    display: none;
}

.nl-popup-step.active {
    display: block;
}

/* Icon */
.nl-popup-icon {
    width: 56px;
    height: 56px;
    background: #f0f4ff;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b5bdb;
    margin-bottom: 20px;
}

.nl-popup-icon svg {
    width: 26px;
    height: 26px;
}

/* Title */
.nl-popup-title {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
    line-height: 1.3;
}

/* Subtitle */
.nl-popup-subtitle {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* Email input */
.nl-popup-input-wrap {
    margin-bottom: 16px;
}

.nl-popup-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-family: system-ui, -apple-system, sans-serif;
    color: #1a1a2e;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.nl-popup-input::placeholder {
    color: #9ca3af;
}

.nl-popup-input:focus {
    border-color: #3b5bdb;
    box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.1);
}

.nl-popup-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Preferences area */
.nl-popup-preferences {
    margin-bottom: 20px;
}

.nl-popup-pref-label {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: block;
}

/* Subsections (for diamonds/jewelry specific options) */
.nl-popup-subsection {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

/* Tag pills */
.nl-popup-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.nl-popup-tags-compact {
    gap: 6px;
}

.nl-popup-tag {
    padding: 7px 16px;
    border-radius: 100px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.nl-popup-tag-small {
    padding: 5px 12px;
    font-size: 12px;
}

.nl-popup-tag:hover {
    border-color: #c7d2fe;
    background: #f8f9ff;
}

.nl-popup-tag.selected {
    border-color: #3b5bdb;
    background: #eef2ff;
    color: #3b5bdb;
}

/* Info box for product tracking */
.nl-popup-info-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 16px;
}

.nl-popup-info-box strong {
    color: #1a1a2e;
    font-weight: 600;
}

/* Select dropdown (price drop %) */
.nl-popup-select-wrap {
    position: relative;
}

.nl-popup-select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    font-family: system-ui, -apple-system, sans-serif;
    color: #1a1a2e;
    background: #fff;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.2s;
}

.nl-popup-select:focus {
    border-color: #3b5bdb;
    box-shadow: 0 0 0 3px rgba(59, 91, 219, 0.1);
}

/* Submit button */
.nl-popup-submit {
    width: 100%;
    padding: 13px 20px;
    border-radius: 10px;
    background: #1a1a2e;
    color: #fff;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nl-popup-submit:hover {
    background: #12122a;
}

.nl-popup-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.nl-popup-submit .nl-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: nlSpin 0.6s linear infinite;
}

@keyframes nlSpin {
    to { transform: rotate(360deg); }
}

/* Privacy note */
.nl-popup-privacy {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
    margin-top: 14px;
    line-height: 1.4;
}

/* Error message */
.nl-popup-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #dc2626;
    margin-bottom: 16px;
    display: none;
}

.nl-popup-error.visible {
    display: block;
}

/* ---- Success Step ---- */
.nl-popup-success-icon {
    width: 64px;
    height: 64px;
    background: #ecfdf5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #10b981;
}

.nl-popup-success-icon svg {
    width: 32px;
    height: 32px;
}

.nl-popup-success-title {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    text-align: center;
    margin: 0 0 8px;
}

.nl-popup-success-msg {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin: 0 0 24px;
    line-height: 1.5;
}

.nl-popup-done {
    width: 100%;
    padding: 13px 20px;
    border-radius: 10px;
    background: #1a1a2e;
    color: #fff;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.nl-popup-done:hover {
    background: #12122a;
}

/* =============================================
   Homepage CTA Section (jewelry)
   ============================================= */
.jewelry-newsletter-cta {
    padding: 48px 0 56px;
    background: #f9fafb;
    border-top: 1px solid #f0f0f0;
}

.jewelry-nl-cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.jewelry-nl-cta-text h2 {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 24px;
    font-weight: 200;
    color: var(--jewelry-text);
    margin: 0 0 6px;
}

.jewelry-nl-cta-text p {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* =============================================
   Price Drop Button (product page)
   ============================================= */
.jewelry-price-drop-wrap {
    margin: 3px 0 12px 0;
}

.jewelry-notify-price-drop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid #9ca3af40;
    background: #fff;
    color: #9CA3AF;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    width: 100%;
    justify-content: center;
    margin-bottom: 3px;
}

.jewelry-notify-price-drop:hover {
    border-color: #3b5bdb;
    background: #f8f9ff;
    color: #3b5bdb;
}

.jewelry-notify-price-drop svg {
    width: 16px;
    height: 16px;
}

/* =============================================
   Notify Available Button (search no-results)
   ============================================= */
.jewelry-notify-available-wrap {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.jewelry-notify-available-text {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 12px;
}

.jewelry-notify-available {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 24px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.jewelry-notify-available:hover {
    border-color: #3b5bdb;
    background: #f8f9ff;
    color: #3b5bdb;
}

.jewelry-notify-available svg {
    width: 16px;
    height: 16px;
}

/* =============================================
   Mobile
   ============================================= */
@media (max-width: 480px) {
    .nl-popup-step {
        padding: 24px 20px;
    }

    .nl-popup-title {
        font-size: 19px;
    }

    .nl-popup-icon {
        width: 48px;
        height: 48px;
    }

    .nl-popup-icon svg {
        width: 22px;
        height: 22px;
    }

    .nl-popup-tag {
        padding: 6px 12px;
        font-size: 12px;
    }

    .jewelry-nl-cta-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .jewelry-nl-cta-text h2 {
        font-size: 20px;
    }
}
