/* NLM Schedule Plugin Styles — v2.2
   Navy #0F172A | Blue #3B82F6 | Slate #1E293B
   Fonts: Montserrat (headings), Lato (body) */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Lato:wght@400;500&display=swap');

.nlm-schedule-wrapper {
    background: #0F172A;
    padding: 3rem 2rem;
    font-family: 'Lato', sans-serif;
    color: #fff;
}

.nlm-schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2rem;
}

.nlm-schedule-titles {
    flex: 1;
}

.nlm-refresh-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
}

.nlm-refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 3px;
    color: #3B82F6;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.nlm-refresh-btn:hover:not(:disabled) {
    background: rgba(255, 188, 125, 0.1);
    border-color: #3B82F6;
    color: #fff;
}

.nlm-refresh-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.nlm-refresh-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.nlm-refresh-btn.loading {
    opacity: 0.7;
}

.nlm-refresh-icon {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    animation: spin 0.6s linear infinite;
}

.nlm-refresh-btn:not(.loading) .nlm-refresh-icon {
    animation: none;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.nlm-refresh-btn.success {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
    color: #4CAF50;
}

.nlm-refresh-btn.error {
    background: rgba(244, 67, 54, 0.2);
    border-color: #F44336;
    color: #F44336;
}

.nlm-last-updated {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Lato', sans-serif;
    min-width: 130px;
    text-align: right;
}

.nlm-schedule-heading {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #3B82F6;
    margin: 0 0 0.5rem 0;
}

.nlm-schedule-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2rem 0;
    line-height: 1.2;
}

/* ---- Month tabs (filter the list by month) ----
   Scoped under .nlm-schedule-wrapper so they beat the Hello Elementor theme
   reset, which styles bare [type=button]/button with a red accent. */
.nlm-month-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 1.25rem;
}
.nlm-schedule-wrapper .nlm-month-tab {
    padding: 0.4rem 0.9rem;
    background: transparent;
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 999px;
    color: rgba(255,255,255,0.7);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}
.nlm-schedule-wrapper .nlm-month-tab:hover {
    border-color: #3B82F6;
    color: #fff;
}
.nlm-schedule-wrapper .nlm-month-tab.active {
    background: #3B82F6;
    border-color: #3B82F6;
    color: #fff;
}

.nlm-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(255,255,255,0.07);
    border-radius: 6px;
    overflow: hidden;
}

.nlm-schedule-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    background: #0F172A;
    transition: background 0.2s ease;
}

.nlm-schedule-item:hover {
    background: #141f2e;
}

.nlm-schedule-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1E293B;
    padding: 1.25rem 0.5rem;
    border-right: 3px solid #3B82F6;
    text-align: center;
    transition: background 0.2s ease;
}

.nlm-schedule-item:hover .nlm-schedule-date-badge {
    background: #243447;
}

.nlm-date-month {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #3B82F6;
    line-height: 1;
}

.nlm-date-day {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}

.nlm-date-year {
    font-family: 'Lato', sans-serif;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.4;
}

.nlm-schedule-body {
    padding: 1.1rem 1.25rem;
}

.nlm-event-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.45rem 0;
    line-height: 1.3;
}

.nlm-schedule-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.4rem;
}

.nlm-meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

.nlm-meta-item svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    stroke: #3B82F6;
    opacity: 0.85;
}

.nlm-location {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.nlm-location:hover {
    color: #3B82F6;
}

.nlm-description {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    line-height: 1.5;
    margin-top: 0.3rem;
}

.nlm-description p { margin: 0; }

.nlm-schedule-empty {
    padding: 2.5rem;
    text-align: center;
    color: rgba(255,255,255,0.35);
    font-style: italic;
    font-size: 0.9rem;
}

.nlm-schedule-footer {
    margin-top: 1.5rem;
    text-align: right;
}

.nlm-schedule-cta {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #3B82F6;
    text-decoration: none;
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 0.5rem 1.1rem;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.nlm-schedule-cta:hover {
    background: #3B82F6;
    color: #fff;
    border-color: #3B82F6;
}

/* ============================================================
   Email signup capture — empty-state panel + compact strip
   ============================================================ */

/* Honeypot: visually + AT hidden, but still in the DOM for bots */
.nlm-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ---- Empty-state opportunity panel ---- */
.nlm-empty-panel {
    background: linear-gradient(160deg, #1E293B 0%, #0F172A 100%);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.nlm-empty-panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #3B82F6, transparent);
}
.nlm-empty-eyebrow {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #3B82F6;
    margin-bottom: 0.85rem;
}
.nlm-empty-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}
.nlm-empty-body {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.7);
    max-width: 520px;
    margin: 0 auto 1.75rem;
    line-height: 1.55;
}

/* ---- Shared signup form (empty panel variant) ---- */
.nlm-signup-form {
    display: flex;
    gap: 0.5rem;
    max-width: 460px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.nlm-signup-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 0.85rem 1rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    color: #fff;
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.nlm-signup-form input[type="email"]:focus {
    border-color: #3B82F6;
    background: rgba(59, 130, 246, 0.08);
}
.nlm-signup-form input[type="email"]::placeholder {
    color: rgba(255,255,255,0.4);
}
/* Scoped under .nlm-schedule-wrapper so these win over the Hello Elementor
   theme reset, which styles bare [type=submit]/button with a red (#c36) accent
   at equal specificity. */
.nlm-schedule-wrapper .nlm-signup-btn {
    padding: 0.85rem 1.5rem;
    background: #3B82F6;
    border: 1px solid #3B82F6;
    border-radius: 4px;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}
.nlm-schedule-wrapper .nlm-signup-btn:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    transform: translateY(-1px);
}
.nlm-schedule-wrapper .nlm-signup-btn:disabled {
    opacity: 0.6;
    cursor: wait;
    transform: none;
}
.nlm-signup-foot {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    margin-top: 1rem;
    font-style: italic;
}

/* ---- Compact "stay in the loop" strip (events scheduled) ---- */
.nlm-stay-loop {
    margin-top: 1.75rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.nlm-stay-loop-text {
    flex: 1;
    min-width: 220px;
}
.nlm-stay-loop-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #3B82F6;
    margin-bottom: 0.25rem;
}
.nlm-stay-loop-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}
.nlm-stay-loop .nlm-signup-form {
    gap: 0.4rem;
    flex: 1;
    min-width: 260px;
    max-width: 340px;
    margin: 0;
    flex-wrap: nowrap;
}
.nlm-stay-loop .nlm-signup-form input[type="email"] {
    min-width: 0;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 3px;
}
.nlm-stay-loop .nlm-signup-form button {
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 3px;
    color: #3B82F6;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}
.nlm-stay-loop .nlm-signup-form button:hover {
    background: #3B82F6;
    color: #fff;
}

/* ---- Success / error states ---- */
.nlm-signup-success,
.nlm-signup-error {
    display: none;
    font-family: 'Lato', sans-serif;
    line-height: 1.45;
}
.nlm-signup-success {
    color: #3B82F6;
    font-weight: 700;
}
.nlm-signup-error {
    color: rgba(255,255,255,0.65);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

/* Empty panel: confirmation replaces the form */
.nlm-empty-panel .nlm-signup-success { font-size: 1.05rem; }
.nlm-signup.is-done .nlm-signup-form,
.nlm-signup.is-done .nlm-signup-foot,
.nlm-signup.is-done .nlm-signup-error { display: none; }
.nlm-signup.is-done .nlm-empty-eyebrow,
.nlm-signup.is-done .nlm-empty-body { opacity: 0.5; }
.nlm-signup.is-done .nlm-signup-success { display: block; }
.nlm-signup.has-error .nlm-signup-error { display: block; }

/* Stay-loop confirmation: collapse text + show inline confirmation */
.nlm-stay-loop.is-done { justify-content: center; text-align: center; }
.nlm-stay-loop.is-done .nlm-stay-loop-text { display: none; }

@media (max-width: 540px) {
    .nlm-schedule-wrapper { padding: 2rem 1rem; }
    .nlm-schedule-item { grid-template-columns: 68px 1fr; }
    .nlm-schedule-date-badge { padding: 1rem 0.35rem; }
    .nlm-date-day { font-size: 1.5rem; }
    .nlm-schedule-body { padding: 0.85rem 1rem; }
    .nlm-schedule-meta { flex-direction: column; gap: 0.35rem; }

    .nlm-empty-panel { padding: 2rem 1.25rem; }
    .nlm-empty-title { font-size: 1.15rem; }
    .nlm-stay-loop { flex-direction: column; align-items: stretch; }
    .nlm-stay-loop .nlm-signup-form { max-width: none; }
}

/* Mobile responsive for refresh controls */
@media (max-width: 540px) {
    .nlm-schedule-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .nlm-refresh-controls {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }
    
    .nlm-last-updated {
        min-width: auto;
        text-align: left;
        font-size: 0.7rem;
    }
    
    .nlm-refresh-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .nlm-refresh-icon {
        width: 12px;
        height: 12px;
    }
}
