/* ═══════════════════════════════════════════════════════════
   NP2 Editorial Module Styles
   ═══════════════════════════════════════════════════════════ */

/* ─── Queue Dashboard ───────────────────────────────────── */

.ed-section {
    margin-bottom: 28px;
}

.ed-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 12px 0;
}

.ed-queue-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.ed-queue-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.15s;
}

.ed-queue-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.ed-queue-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ed-queue-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.ed-queue-count {
    font-size: 13px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

.ed-queue-desc {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 6px;
}

.ed-queue-badges {
    display: flex;
    gap: 4px;
}

/* ─── My Articles ───────────────────────────────────────── */

.ed-my-articles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ed-my-article {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s;
}

.ed-my-article:hover {
    background: #f9fafb;
}

.ed-my-article-headline {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.ed-my-article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.ed-my-article-time {
    color: #9ca3af;
    font-size: 12px;
}

/* ─── Article List ──────────────────────────────────────── */

.btn-back {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    font-family: inherit;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.1s;
}

.btn-back:hover {
    background: #f3f4f6;
}

.ed-list-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ed-article-headline-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ed-article-title {
    font-weight: 500;
    color: #111827;
}

.ed-article-sub {
    font-size: 12px;
    color: #9ca3af;
}

.btn-sm {
    width: 36px;
    height: 32px;
    border: 1.5px solid #93c5fd;
    border-radius: 6px;
    background: #eff6ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 12px;
    transition: all 0.15s;
}

.btn-sm svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.btn-sm:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

/* ─── Move Dialog ───────────────────────────────────────── */

.ed-transition-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ed-transition-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.1s;
}

.ed-transition-btn:hover {
    background: #f9fafb;
}

.ed-transition-selected {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
}

.ed-transition-name {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.ed-transition-dest {
    font-size: 12px;
    color: #6b7280;
}

/* ─── Article Editor ────────────────────────────────────── */

.ed-editor-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    margin-top: 8px;
}

@media (max-width: 900px) {
    .ed-editor-layout {
        grid-template-columns: 1fr;
    }
}

.ed-editor-main {
    min-width: 0;
}

.ed-headline-input {
    width: 100%;
    padding: 8px 0;
    border: none;
    border-bottom: 2px solid #e5e7eb;
    font-size: 24px;
    font-weight: 700;
    font-family: inherit;
    color: #111827;
    outline: none;
    transition: border-color 0.2s;
}

.ed-headline-input:focus {
    border-bottom-color: #2563eb;
}

.ed-subheadline-input {
    width: 100%;
    padding: 6px 0;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    font-size: 16px;
    font-family: inherit;
    color: #4b5563;
    outline: none;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}

.ed-subheadline-input:focus {
    border-bottom-color: #2563eb;
}

/* ─── Blocks ────────────────────────────────────────────── */

.ed-block-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.ed-block {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    transition: border-color 0.15s;
}

.ed-block:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.ed-block-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 8px;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
    border-radius: 6px 6px 0 0;
}

.ed-block-type-badge {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ed-block-actions {
    display: flex;
    gap: 2px;
}

.ed-block-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s, color 0.1s;
}

.ed-block-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.ed-block-remove:hover {
    background: #fecaca;
    color: #dc2626;
}

.ed-block-content {
    padding: 8px 12px 12px;
}

.ed-block-text,
.ed-block-quote {
    width: 100%;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    color: #111827;
    resize: vertical;
    background: transparent;
}

.ed-block-quote {
    font-size: 18px;
    font-style: italic;
    color: #374151;
    line-height: 1.5;
    border-left: 3px solid #3b82f6;
    padding-left: 12px;
    margin-bottom: 8px;
}

.ed-block-input {
    width: 100%;
    padding: 4px 0;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    font-family: inherit;
    font-size: 13px;
    color: #4b5563;
    outline: none;
    margin-top: 4px;
}

.ed-block-input:focus {
    border-bottom-color: #2563eb;
}

.ed-block-heading-input {
    width: 100%;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.ed-block-code {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 13px;
    background: #f8fafc;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.ed-block-divider {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 8px 0;
}

/* ─── Add Block Bar ─────────────────────────────────────── */

.ed-add-block {
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    padding: 8px;
}

.ed-add-block-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ed-add-block-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: white;
    font-size: 12px;
    font-family: inherit;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
}

.ed-add-block-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #374151;
}

.ed-add-block-icon {
    font-size: 14px;
}

/* ─── Sidebar ───────────────────────────────────────────── */

.ed-editor-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ed-sidebar-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
}

.ed-sidebar-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 10px 0;
}

.ed-sidebar-field {
    margin-bottom: 10px;
}

.ed-sidebar-field:last-child {
    margin-bottom: 0;
}

.ed-sidebar-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 3px;
}

.ed-sidebar-field input,
.ed-sidebar-field select,
.ed-sidebar-section textarea {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.15s;
}

.ed-sidebar-field input:focus,
.ed-sidebar-field select:focus,
.ed-sidebar-section textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.ed-sidebar-actions {
    padding-top: 4px;
}

.ed-sidebar-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #9ca3af;
    padding: 8px 14px;
}

.ed-sidebar-meta strong {
    color: #374151;
}

.ed-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    margin-bottom: 4px;
}

.ed-checkbox input {
    width: auto !important;
}

.ed-breadcrumb-link {
    color: #2563eb;
    text-decoration: none;
}

.ed-breadcrumb-link:hover {
    text-decoration: underline;
}


/* Dateline / Kicker — small, uppercase-ish lead-in above the headline */
.ed-kicker-input {
    width: 100%;
    box-sizing: border-box;
    border: none;
    border-bottom: 1px solid transparent;
    padding: 4px 0;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #64748b;
    background: transparent;
    outline: none;
    font-family: inherit;
}
.ed-kicker-input:focus { border-bottom-color: #cbd5e1; }
.ed-kicker-input::placeholder { color: #cbd5e1; font-weight: 400; text-transform: none; letter-spacing: 0; }
 
/* Field blocks: a labeled section for Body / Pull Quote / Caption */
.ed-field-block { margin-top: 22px; }
.ed-field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #94a3b8;
    margin-bottom: 6px;
}
 
/* Shared text inputs/areas for the new fields — clean, sans-serif, bordered */
.ed-body-input,
.ed-pullquote-input,
.ed-caption-input {
    width: 100%;
    box-sizing: border-box;
    font-family: Georgia, 'Times New Roman', serif;  /* readable body face; change to inherit for sans */
    font-size: 16px;
    line-height: 1.6;
    color: #1e293b;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    resize: vertical;
}
.ed-body-input:focus,
.ed-pullquote-input:focus,
.ed-caption-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.ed-body-input::placeholder,
.ed-pullquote-input::placeholder,
.ed-caption-input::placeholder { color: #cbd5e1; }
 
/* Body is the workhorse — give it room and comfortable reading width */
.ed-body-input { min-height: 320px; }
 
/* Pull quote reads as an emphasized quote */
.ed-pullquote-input {
    font-style: italic;
    font-size: 18px;
    color: #334155;
}
 
/* Caption is a small single line */
.ed-caption-input {
    font-size: 13px;
    font-family: inherit;
    color: #475569;
}
.ed-images { margin-top: 22px; }
.ed-images-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.ed-images-hint { font-size:12px; color:#94a3b8; font-style:italic; }
.ed-upload-btn { cursor:pointer; font-size:13px; font-weight:600; color:#3b82f6; padding:6px 10px; border:1px solid #bfdbfe; border-radius:6px; background:#eff6ff; }
.ed-upload-btn:hover { background:#dbeafe; }
.ed-images-list { display:flex; flex-direction:column; gap:12px; }
.ed-images-empty, .ed-images-loading { color:#94a3b8; font-size:13px; padding:8px 0; }
 
.ed-image-card { display:flex; gap:12px; border:1px solid #e2e8f0; border-radius:8px; padding:10px; background:#fff; }
.ed-image-card.is-primary { border-color:#3b82f6; box-shadow:0 0 0 2px rgba(59,130,246,0.12); }
.ed-image-thumb { flex: 0 0 240px; }
.ed-image-thumb img {
    width: 240px;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    background: #f1f5f9;
    display: block;
    cursor: zoom-in;           /* signals it's clickable */
    transition: opacity 0.15s;
}
.ed-image-thumb img:hover { opacity: 0.9; }
 
.ed-image-primary-badge { position:absolute; top:4px; left:4px; background:#3b82f6; color:#fff; font-size:10px; font-weight:700; padding:2px 6px; border-radius:4px; text-transform:uppercase; letter-spacing:0.4px; }
.ed-image-fields { flex:1; display:flex; flex-direction:column; gap:6px; }
.ed-image-fields input { width:100%; box-sizing:border-box; padding:6px 8px; border:1px solid #e2e8f0; border-radius:6px; font-size:13px; font-family:inherit; }
.ed-image-fields input:focus { outline:none; border-color:#3b82f6; }
.ed-image-actions { display:flex; gap:8px; margin-top:2px; flex-wrap:wrap; }
.ed-image-actions button { font-size:12px; padding:4px 10px; border-radius:6px; border:1px solid #e2e8f0; background:#f8fafc; cursor:pointer; color:#475569; }
.ed-image-makeprimary:hover { border-color:#3b82f6; color:#3b82f6; }
.ed-image-save:hover { border-color:#16a34a; color:#16a34a; }
.ed-image-delete:hover { border-color:#ef4444; color:#ef4444; }

.ed-image-loading { background: #f0f0f0; min-height: 80px; }
.ed-image-failed { background: #fde8e8; min-height: 80px; }
.ed-image-failed::after { content: "⚠"; color: #c00; }

.ed-lightbox {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15, 23, 42, 0.85);
    display: flex; align-items: center; justify-content: center;
    padding: 32px; cursor: zoom-out;
}
.ed-lightbox-inner { position: relative; max-width: 95vw; max-height: 95vh; }
.ed-lightbox-inner img {
    max-width: 95vw; max-height: 95vh; object-fit: contain;
    border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.5); display: block;
}
.ed-lightbox-close {
    position: absolute; top: -14px; right: -14px;
    width: 36px; height: 36px; border-radius: 50%;
    background: #fff; border: none; cursor: pointer;
    font-size: 24px; line-height: 1; color: #334155;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.ed-lightbox-close:hover { background: #f1f5f9; }
 
.ed-article-headline-cell { display: flex; align-items: left; gap: 12px; }
 
/* Keep the thumbs centered within their little strip */
.ed-article-thumbs { align-items: center; justify-content: center; }
 
.ed-article-thumb {
    width: 120px;
    object-fit: cover;
    border-radius: 5px;
    background: #f1f5f9;
    cursor: zoom-in;
}
.ed-article-thumb-more {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 42px; padding: 0 8px;
    background: #f1f5f9; color: #475569;
    border-radius: 5px; font-size: 12px; font-weight: 700;
}
.ed-article-headline-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: left;          /* ← left-align the title/sub */
    align-items: flex-start;   /* ← in case a flex parent was centering */
}
.ed-article-title { text-align: left; }
.ed-article-sub   { text-align: left; }
/* Placement status ball */
.ed-place-ball {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08) inset;
}
 
/* Subtle row tints (kept very light so text stays readable). The left border
   gives a crisp color cue; the background is a faint wash. */
.ed-place-row-unplaced td:first-child { box-shadow: inset 3px 0 0 #ef4444; }
.ed-place-row-placed   td:first-child { box-shadow: inset 3px 0 0 #22c55e; }
.ed-place-row-removed  td:first-child { box-shadow: inset 3px 0 0 #f97316; }
.ed-place-row-dirty    td:first-child { box-shadow: inset 3px 0 0 #3b82f6; }
 
.ed-place-row-placed   { background: rgba(34,197,94,0.05); }
.ed-place-row-removed  { background: rgba(249,115,22,0.06); }
.ed-place-row-dirty    { background: rgba(59,130,246,0.05); }
/* unplaced: no background wash — keeps the "default/to-do" rows neutral */
 
/* Right-click context menu */
.ed-context-menu {
    position: fixed; z-index: 10000;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    padding: 4px; min-width: 200px;
}
.ed-context-item {
    padding: 8px 12px; font-size: 13px; color: #334155;
    border-radius: 5px; cursor: pointer; white-space: nowrap;
}
.ed-context-item:hover { background: #f1f5f9; }
 