/* ═══════════════════════════════════════════════════════════════════
   PMM Research Feed — pmm-feed.css
   Enqueue this AFTER pmm-public.css (already in plugin).
   Add to PMM_Public::enqueue_assets():
       wp_enqueue_style('pmm-feed', PMM_PLUGIN_URL.'public/css/pmm-feed.css', ['pmm-public'], PMM_VERSION);
   ═══════════════════════════════════════════════════════════════════ */

/* ── Feed wrapper ────────────────────────────────────────────────── */
.pmm-feed-wrap {
    margin-top: 28px;
}
.pmm-feed-header {
    margin-bottom: 16px;
}
.pmm-feed-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--pmm-primary);
    margin: 0;
    padding-left: 12px;
    border-left: 4px solid #B0893C;
}

/* ── Tabs ────────────────────────────────────────────────────────── */
.pmm-feed-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--pmm-border);
    margin-bottom: 24px;
    padding-bottom: 0;
}
.pmm-feed-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pmm-muted);
    cursor: pointer;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
.pmm-feed-tab:hover {
    color: var(--pmm-primary);
}
.pmm-feed-tab.active {
    color: #B0893C;
    border-bottom-color: #B0893C;
}
.pmm-feed-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--pmm-border);
    color: var(--pmm-muted);
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
}
.pmm-feed-tab.active .pmm-feed-tab__count {
    background: #B0893C;
    color: #fff;
}

/* ── Tab panels ──────────────────────────────────────────────────── */
.pmm-feed-panel {
    display: none;
}
.pmm-feed-panel.active {
    display: block;
}

/* ── Locked notice ───────────────────────────────────────────────── */
.pmm-feed-locked-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 20px;
}

/* ── Note cards grid ─────────────────────────────────────────────── */
.pmm-note-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    align-items: start;
}

/* ── Note card ───────────────────────────────────────────────────── */
.pmm-note-card {
    background: #fff;
    border: 1px solid #E4E4E4;
    border-left: 4px solid #B0893C;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: visible;
}
.pmm-note-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 0 1px rgba(176,137,60,.18),
                0 8px 28px rgba(176,137,60,.14),
                0 16px 40px rgba(0,0,0,.08);
    border-color: #C8A05A;
}

/* Upcoming card — muted style */
.pmm-note-card--upcoming {
    border-left-color: #9ca3af;
    opacity: .85;
}

/* Locked card — blurred */
.pmm-note-card--locked {
    border-left-color: #d1d5db;
    filter: blur(0);        /* outer structure visible */
    user-select: none;
}
.pmm-note-card--locked .pmm-note-head,
.pmm-note-card--locked .pmm-note-compass-row,
.pmm-note-card--locked .pmm-note-fields {
    filter: blur(4px);
    pointer-events: none;
}

/* Lock badge */
.pmm-note-lock-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #374151;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
    z-index: 2;
}

/* ── Note head ───────────────────────────────────────────────────── */
.pmm-note-head {
    padding: 18px 18px 12px;
    border-bottom: 1px solid #f0f0f0;
}
.pmm-note-type-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}
.pmm-note-type-icon {
    font-size: 15px;
    line-height: 1;
}
.pmm-note-status {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #B0893C;
    background: rgba(176,137,60,.08);
    border: 1px solid rgba(176,137,60,.2);
    padding: 2px 8px;
    border-radius: 4px;
}
.pmm-note-status--upcoming {
    color: #6b7280;
    background: #f3f4f6;
    border-color: #e5e7eb;
}
.pmm-note-title {
    font-size: 17px;
    font-weight: 800;
    color: #00072D;
    line-height: 1.2;
    margin-bottom: 4px;
}
.pmm-note-sub {
    font-size: 12px;
    color: #9ca3af;
    letter-spacing: .02em;
}

/* ── Compass row ─────────────────────────────────────────────────── */
.pmm-note-compass-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    border-bottom: 1px solid #f0f0f0;
}
.pmm-note-compass-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #9ca3af;
}
.pmm-note-compass {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
}
.pmm-note-compass--buy     { background: #d1fae5; color: #065f46; }
.pmm-note-compass--sell    { background: #fee2e2; color: #991b1b; }
.pmm-note-compass--hold    { background: #fef3c7; color: #92400e; }
.pmm-note-compass--pending { background: #f3f4f6; color: #6b7280; }

/* ── Data fields ─────────────────────────────────────────────────── */
.pmm-note-fields {
    padding: 4px 18px 0;
    display: flex;
    flex-direction: column;
}
.pmm-note-field {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}
.pmm-note-field:last-child {
    border-bottom: none;
}
.pmm-note-field__label {
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.pmm-note-field__value {
    color: #00072D;
    font-weight: 700;
    text-align: right;
}

/* ── Card foot ───────────────────────────────────────────────────── */
.pmm-note-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 18px;
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.pmm-note-date {
    font-size: 11px;
    color: #c4c4c4;
    letter-spacing: .03em;
}
.pmm-note-cta {
    font-size: 12px !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    text-decoration: none;
    white-space: nowrap;
}
.pmm-note-pending-cta {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
}
.pmm-note-locked-msg,
.pmm-note-upcoming-msg {
    font-size: 12px;
    color: #9ca3af;
    flex: 1;
    text-align: right;
    font-style: italic;
}

/* ── Shortcode [pmm_feed] standalone (outside dashboard) ─────────── */
.pmm-feed-shortcode {
    padding: 0;
}

/* ── PDF Report Modal ────────────────────────────────────────────── */
.pmm-pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pmm-pdf-modal[hidden] {
    display: none;
}
.pmm-pdf-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    cursor: pointer;
}
.pmm-pdf-modal-shell {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: min(92vw, 920px);
    height: min(90vh, 720px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .4);
    overflow: hidden;
}
.pmm-pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0;
}
.pmm-pdf-modal-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pmm-pdf-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 2px 6px;
    border-radius: 6px;
    transition: color .15s, background .15s;
    flex-shrink: 0;
}
.pmm-pdf-modal-close:hover {
    color: #111827;
    background: #e5e7eb;
}
.pmm-pdf-modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
}
.pmm-pdf-modal-frame {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
    display: block;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .pmm-note-grid {
        grid-template-columns: 1fr;
    }
    .pmm-feed-tabs {
        gap: 2px;
    }
    .pmm-feed-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
    .pmm-pdf-modal-shell {
        width: 98vw;
        height: 95vh;
        border-radius: 8px;
    }
}
