/* ── LJ Newsletter — Frontend Widget ─────────────────────────────────────── */

.ljn-widget {
    background: var(--ljn-bg, #1a2238);
    color: var(--ljn-text, #ffffff);
    border-radius: var(--ljn-radius, 18px);
    padding: 28px 28px 24px;
    max-width: 480px;
    width: 100%;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    position: relative;
    overflow: hidden;
}

.ljn-widget *,
.ljn-widget *::before,
.ljn-widget *::after {
    box-sizing: border-box;
    font-family: inherit !important;
}

.ljn-widget::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255,255,255,0.07);
    pointer-events: none;
    z-index: 0;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.ljn-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.ljn-icon {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    overflow: hidden;
}

.ljn-icon svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff !important;
    fill: none !important;
    display: block;
}

.ljn-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ljn-header-text { display: flex; flex-direction: column; gap: 3px; }

.ljn-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: var(--ljn-title-size, 22px) !important;
    font-weight: 700 !important;
    color: var(--ljn-title-color, #ffffff) !important;
    line-height: 1.2 !important;
    font-family: inherit !important;
    background: none !important;
    border: none !important;
}

.ljn-subtitle {
    margin: 0 !important;
    padding: 0 !important;
    font-size: var(--ljn-subtitle-size, 14px) !important;
    color: var(--ljn-subtitle-color, rgba(255,255,255,0.6)) !important;
    font-weight: 400 !important;
    font-family: inherit !important;
    background: none !important;
}

/* ── Description ─────────────────────────────────────────────────────────── */
.ljn-description {
    font-size: var(--ljn-desc-size, 15px) !important;
    line-height: 1.6;
    color: var(--ljn-desc-color, rgba(255,255,255,0.82)) !important;
    margin: 0 0 22px !important;
    padding: 0 !important;
    font-family: inherit !important;
    position: relative;
    z-index: 1;
}

/* ── Form ────────────────────────────────────────────────────────────────── */
.ljn-form-wrap {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    position: relative;
    z-index: 1;
    width: 100%;
}

.ljn-email-input {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    background: var(--ljn-input-bg, rgba(255,255,255,0.08)) !important;
    border: 1.5px solid rgba(255,255,255,0.12) !important;
    border-radius: var(--ljn-input-radius, 12px) !important;
    padding: 16px 20px !important;
    font-size: 15px !important;
    font-family: inherit !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s, background 0.2s;
    line-height: 1.4 !important;
    height: 56px !important;
    min-height: 56px !important;
    margin: 0 0 15px 0 !important;
    text-align: left !important;
    text-indent: 0 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    vertical-align: middle !important;
    caret-color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-appearance: none;
    appearance: none;
}

.ljn-email-input::placeholder { color: rgba(255,255,255,0.38) !important; }

.ljn-email-input:focus {
    border-color: rgba(255,255,255,0.3) !important;
    background: rgba(255,255,255,0.11) !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06) !important;
}

.ljn-email-input.ljn--error {
    border-color: #ff5f5f !important;
    box-shadow: 0 0 0 3px rgba(255,95,95,0.15) !important;
}

/* ── Submit button ───────────────────────────────────────────────────────── */
.ljn-submit-btn {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    outline: none !important;
    border-radius: var(--ljn-btn-radius, 12px) !important;
    padding: 17px 24px !important;
    font-size: var(--ljn-btn-size, 16px) !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 18px rgba(0,0,0,0.25);
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    line-height: 1 !important;
    min-height: 58px !important;
    margin: 0 !important;
    -webkit-appearance: none;
    appearance: none;
    /* Background & text color set inline — DO NOT override here */
}

/* Shine overlay */
.ljn-submit-btn::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: rgba(255,255,255,0.10);
    pointer-events: none;
    border-radius: inherit;
}

.ljn-submit-btn:hover  { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(0,0,0,0.32); }
.ljn-submit-btn:active { transform: translateY(0); filter: brightness(0.95); }
.ljn-submit-btn:disabled { opacity: 0.72 !important; cursor: not-allowed; transform: none; }

/* Button text — always visible, never hidden */
.ljn-btn-text {
    position: relative;
    z-index: 2;
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    white-space: nowrap;
    /* color applied via inline style on the button */
}

.ljn-btn-icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    fill: none !important;
    display: block;
}

/* Spinner */
.ljn-spin {
    width: 20px;
    height: 20px;
    display: block;
    animation: ljn-rotate 0.8s linear infinite;
    position: relative;
    z-index: 2;
}
@keyframes ljn-rotate { to { transform: rotate(360deg); } }

/* ── Alert ───────────────────────────────────────────────────────────────── */
.ljn-alert {
    margin: 0 0 12px 0 !important;
}

.ljn-alert {
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px !important;
    font-weight: 500;
    line-height: 1.5;
    font-family: inherit !important;
}
.ljn-alert--hidden { display: none !important; margin: 0 !important; }
.ljn-alert--success { background: rgba(52,199,89,0.15); border: 1px solid rgba(52,199,89,0.35); color: #6ee99c !important; }
.ljn-alert--error   { background: rgba(255,59,48,0.15);  border: 1px solid rgba(255,59,48,0.35);  color: #ff8a82 !important; }

.ljn-widget.ljn--subscribed .ljn-form-wrap { display: none !important; }
.ljn-widget.ljn--subscribed .ljn-alert     { display: block !important; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.ljn-footer-text {
    text-align: center;
    font-size: var(--ljn-footer-size, 12px) !important;
    color: var(--ljn-footer-color, rgba(255,255,255,0.38)) !important;
    margin: 16px 0 0 !important;
    padding: 0 !important;
    font-family: inherit !important;
    position: relative;
    z-index: 1;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .ljn-widget { padding: 22px 20px 20px; border-radius: 14px; }
    .ljn-title  { font-size: 19px !important; }
    .ljn-description { font-size: 14px !important; }
}
