/**
 * Newsletters Archive – SendPulse
 * Frontend styles for [newsletters_archive] shortcode
 */

/* ---- Custom property: overrideable from theme ---- */
.np-wrapper {
    --np-color: #0073aa; /* fallback; overridden inline when user sets a color */
    --np-bg: #ffffff;
    --np-border: #e8eaed;
    --np-radius: 10px;
    --np-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    --np-hover-bg: #f5faff;
    --np-text: #1a1a2e;
    --np-muted: #6b7280;
    --np-font: inherit;

    font-family: var(--np-font);
    max-width: 780px;
    margin: 2em auto;
}

/* ---- Section heading ---- */
.np-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--np-text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--np-color);
    display: inline-block;
}

/* ---- Empty state ---- */
.np-empty {
    color: var(--np-muted);
    font-style: italic;
    text-align: center;
    padding: 2em 0;
}

/* ---- List ---- */
.np-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ---- Each item ---- */
.np-item {
    margin: 0;
    padding: 0;
}

.np-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    background: var(--np-bg);
    border: 1px solid var(--np-border);
    border-radius: var(--np-radius);
    box-shadow: var(--np-shadow);
    text-decoration: none;
    color: var(--np-text);
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
    position: relative;
}

.np-link:hover,
.np-link:focus-visible {
    background: var(--np-hover-bg);
    border-color: var(--np-color);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--np-text);
    outline: 2px solid var(--np-color);
    outline-offset: 2px;
}

/* ---- Title ---- */
.np-title {
    flex: 1;
    font-weight: 600;
    font-size: 1rem;
    color: var(--np-color);
    transition: color 0.2s ease;
    line-height: 1.4;
}

.np-link:hover .np-title {
    text-decoration: underline;
}

/* ---- Date badge ---- */
.np-date {
    font-size: 0.8rem;
    color: var(--np-muted);
    white-space: nowrap;
    background: #f3f4f6;
    padding: 0.25em 0.65em;
    border-radius: 20px;
    letter-spacing: 0.01em;
}

/* ---- Arrow icon ---- */
.np-arrow {
    width: 16px;
    height: 16px;
    color: var(--np-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.np-link:hover .np-arrow {
    transform: translateX(3px);
    color: var(--np-color);
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .np-link {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .np-date {
        order: -1;
    }
    .np-arrow {
        display: none;
    }
}
