/* ============================================================
   CTN Newsletter — Frontend Widget Styles
   ============================================================ */

/* ── Shared ── */
.nnx-fe-widget { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; }
.nnx-fe-fe-input {
    width: 100%; padding: 11px 14px; border: 1.5px solid #ddd;
    border-radius: 6px; font-size: 14px; box-sizing: border-box;
    transition: border .2s; outline: none;
    font-family: inherit;
}
.nnx-fe-fe-input:focus { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.1); }
.nnx-fe-fe-btn {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff; border: none; border-radius: 6px;
    padding: 11px 22px; font-size: 14px; font-weight: 700;
    cursor: pointer; white-space: nowrap; transition: opacity .2s, transform .15s;
    font-family: inherit;
}
.nnx-fe-fe-btn:hover { opacity: .9; transform: translateY(-1px); }
.nnx-fe-fe-btn-full { width: 100%; padding: 13px; font-size: 15px; }
.nnx-fe-fe-btn-sm   { padding: 8px 16px; font-size: 13px; }
.nnx-fe-fe-msg { font-size: 13px; margin-top: 8px; min-height: 20px; }
.nnx-fe-fe-msg.success { color: #27ae60; font-weight: 600; }
.nnx-fe-fe-msg.error   { color: #c0392b; font-weight: 600; }

/* ── 1. INLINE BAR ── */
.nnx-fe-inline {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #c0392b 100%);
    border-radius: 12px; padding: 28px 32px; margin: 24px 0;
    box-shadow: 0 4px 20px rgba(192,57,43,.25);
}
.nnx-fe-inline-inner {
    display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.nnx-fe-inline-text { flex: 1; min-width: 200px; }
.nnx-fe-inline-title { color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 5px; }
.nnx-fe-inline-sub   { color: rgba(255,255,255,.65); font-size: 13px; line-height: 1.5; }
.nnx-fe-inline-form  { flex: 1.2; min-width: 260px; }
.nnx-fe-inline-row   { display: flex; gap: 8px; }
.nnx-fe-inline .nnx-fe-fe-input { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.nnx-fe-inline .nnx-fe-fe-input::placeholder { color: rgba(255,255,255,.5); }
.nnx-fe-inline .nnx-fe-fe-input:focus { border-color: rgba(255,255,255,.6); box-shadow: none; }

/* ── 2. POPUP TRIGGER BUTTON ── */
.nnx-fe-popup-trigger { display: inline-flex; align-items: center; gap: 6px; }

/* ── 3. BANNER BUTTON ── */
.nnx-fe-banner-btn {
    position: relative; border-radius: 12px; overflow: hidden;
    cursor: pointer; margin: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,.15);
    transition: transform .2s, box-shadow .2s;
}
.nnx-fe-banner-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.2); }
.nnx-fe-banner-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #c0392b 100%);
}
.nnx-fe-banner-content {
    position: relative; display: flex; align-items: center;
    gap: 20px; padding: 22px 28px; flex-wrap: wrap;
}
.nnx-fe-banner-logo  { max-height: 44px; max-width: 140px; object-fit: contain; flex-shrink: 0; }
.nnx-fe-banner-text  { flex: 1; min-width: 140px; }
.nnx-fe-banner-title { color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 3px; }
.nnx-fe-banner-sub   { color: rgba(255,255,255,.65); font-size: 12px; }
.nnx-fe-banner-cta   { flex-shrink: 0; padding: 10px 20px; }

/* ── CARD BUTTON ── */
.nnx-fe-card-btn {
    background: #fff; border: 1.5px solid #eee; border-radius: 12px;
    padding: 28px 24px; text-align: center; margin: 20px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.nnx-fe-card-icon  { font-size: 36px; margin-bottom: 10px; }
.nnx-fe-card-title { font-size: 18px; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.nnx-fe-card-sub   { font-size: 13px; color: #888; margin-bottom: 16px; }

/* ── MINIMAL BUTTON ── */
.nnx-fe-minimal-btn {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px; background: #f8f8f8;
    border-radius: 8px; margin: 16px 0;
    border: 1px solid #eee;
}
.nnx-fe-minimal-text { font-size: 14px; color: #444; flex: 1; font-weight: 500; }

/* ── POPUP OVERLAY ── */
.nnx-fe-popup-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 999999;
    /* NO display:flex here — JS controls visibility via .nnx-fe-popup-visible class */
    display: none;
    align-items: center; justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
}
/* Only show when JS adds this class */
.nnx-fe-popup-overlay.nnx-fe-popup-visible {
    display: flex;
    animation: ctnFadeIn .2s ease;
}
@keyframes ctnFadeIn { from{opacity:0} to{opacity:1} }

.nnx-fe-popup-box {
    background: #fff; border-radius: 16px; max-width: 440px;
    width: 100%; position: relative; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: ctnSlideUp .25s ease;
}
@keyframes ctnSlideUp { from{transform:translateY(20px);opacity:0} to{transform:translateY(0);opacity:1} }

.nnx-fe-popup-close {
    position: absolute; top: 14px; right: 14px;
    background: rgba(255,255,255,.2); border: none; color: #fff;
    width: 30px; height: 30px; border-radius: 50%;
    font-size: 14px; cursor: pointer; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.nnx-fe-popup-close:hover { background: rgba(255,255,255,.35); }

.nnx-fe-popup-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 55%, #c0392b 100%);
    padding: 28px 28px 20px; text-align: center;
}
.nnx-fe-popup-logo  { max-height: 52px; max-width: 200px; object-fit: contain; margin-bottom: 8px; }
.nnx-fe-popup-badge { color: rgba(255,255,255,.55); font-size: 10px; letter-spacing: 2px; font-weight: 700; }

.nnx-fe-popup-body  { padding: 24px 28px 28px; }
.nnx-fe-popup-title { font-size: 20px; font-weight: 700; color: #1a1a2e; margin: 0 0 8px; }
.nnx-fe-popup-sub   { font-size: 13px; color: #666; line-height: 1.6; margin: 0 0 14px; }
.nnx-fe-popup-perks {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-bottom: 18px;
}
.nnx-fe-popup-perks span { font-size: 12px; color: #555; font-weight: 500; }
.nnx-fe-popup-footer { font-size: 11px; color: #bbb; text-align: center; margin: 10px 0 0; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .nnx-fe-inline-inner { flex-direction: column; gap: 16px; }
    .nnx-fe-inline-row   { flex-direction: column; }
    .nnx-fe-banner-content { flex-direction: column; text-align: center; }
    .nnx-fe-banner-logo  { margin: 0 auto; }
}
