/* Editorial tools use the same club colors and controls as the rest of the app. */
#view-newsletter .nl-editor-panel .form-field{min-width:0}
#view-newsletter .nl-editor-panel textarea{box-sizing:border-box;width:100%;max-width:100%;min-width:0;resize:vertical}
#view-newsletter .nl-channel-editor{display:grid;gap:.8rem;margin-block:1.2rem;min-width:0}
#view-newsletter .nl-channel-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.45rem}
#view-newsletter .nl-channel-tabs .filter-chip{width:100%;min-width:0;min-height:44px;margin:0;white-space:normal;text-align:center;justify-content:center}
#view-newsletter .nl-version-grid{display:grid;gap:1rem;min-width:0}
#view-newsletter .nl-channel-editor textarea{width:100%;min-width:0;resize:vertical;font:inherit;line-height:1.55;min-height:6.5rem}
#view-newsletter .nl-inline-actions{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
#view-newsletter .nl-inline-actions .button{width:auto;flex:0 1 auto;min-height:40px}
#view-newsletter .nl-ready{display:flex;gap:.6rem;align-items:center;font-weight:600}
#view-newsletter input[type=checkbox]{width:20px;height:20px;flex:0 0 20px;accent-color:var(--primary,#5394d4)}
#view-newsletter .nl-channel-editor>small,#view-newsletter .nl-photo-meta small{color:var(--muted);font-size:.8rem}
#view-newsletter .nl-history{border:1px solid var(--border,#d4e1ea);border-radius:14px;padding:.7rem}
#view-newsletter .nl-history summary{cursor:pointer;font-weight:600;min-height:32px}
#view-newsletter .nl-history>div{display:grid;gap:.5rem;margin-top:.7rem}
#view-newsletter .nl-photo{align-self:start;overflow:visible}
#view-newsletter .nl-photo-meta{display:grid;gap:.6rem;padding:.65rem;min-width:0}
#view-newsletter .nl-photo-meta label{display:flex;gap:.4rem;align-items:center;font-size:.8rem}
#view-newsletter .nl-photo-meta label:has(input[type=text]),#view-newsletter .nl-photo-meta label:has(.input){display:grid;gap:.25rem}
#view-newsletter .nl-photo-meta input.input{width:100%;min-width:0;padding:.5rem;font-size:.85rem;min-height:40px}
#view-newsletter .nl-batch-check{display:inline-flex;vertical-align:middle;margin-right:.6rem;min-height:44px;align-items:center}
#view-newsletter .nl-batch-check+strong{display:inline!important;white-space:normal!important;overflow-wrap:anywhere}
#view-newsletter .nl-candidate{padding:.8rem;border:1px solid var(--border,#d4e1ea);border-radius:14px;background:var(--club-soft-gradient)}
@media(min-width:1400px){#view-newsletter .nl-version-grid.has-candidate{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){
 #view-newsletter .nl-channel-tabs .filter-chip{font-size:.8rem;padding:.55rem .3rem}
 #view-newsletter .nl-channel-editor textarea{font-size:16px}
 #view-newsletter .nl-inline-actions .button{min-height:44px;font-size:.85rem}
 #view-newsletter .nl-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #view-newsletter .nl-photo-meta .input{font-size:16px!important}
}

/* A separate right column keeps results directly below tournament facts. */
#view-newsletter .nl-reference-panels{display:contents}
@media(min-width:1100px){
 html[data-app-layout] #view-newsletter.view-section[data-lv-page]:not(.is-hidden) .nl-editor-grid{grid-template-columns:minmax(0,1.4fr) minmax(23rem,1fr);grid-template-rows:auto}
 html[data-app-layout] #view-newsletter.view-section[data-lv-page]:not(.is-hidden) .nl-editor-panel{grid-column:1;grid-row:1}
 html[data-app-layout] #view-newsletter.view-section[data-lv-page]:not(.is-hidden) .nl-source-panel{grid-column:auto;grid-row:auto;position:static}
 #view-newsletter .nl-reference-panels{display:grid;grid-column:2;grid-row:1;gap:1rem;min-width:0;align-content:start}
 #view-newsletter .nl-athletes-panel{grid-column:auto;grid-row:auto}
 #view-newsletter .nl-athletes-panel .panel-header{flex-wrap:wrap;gap:.5rem}
 #view-newsletter .nl-athletes-table{width:100%;min-width:0;table-layout:fixed}
 #view-newsletter .nl-athletes-table :is(th,td){padding:.5rem .35rem;white-space:normal;overflow-wrap:anywhere}
 #view-newsletter .nl-athletes-table :is(th,td):first-child{width:40%;min-width:0}
 #view-newsletter .nl-athletes-table :is(th,td):nth-child(2){width:17%}
 #view-newsletter .nl-athletes-table :is(th,td):nth-child(3){width:21%}
 #view-newsletter .nl-athletes-table :is(th,td):nth-child(n+4){width:11%;text-align:center}
}

#view-newsletter .nl-export-actions{display:flex;justify-content:flex-end;align-items:center;gap:1rem;margin-top:1rem;flex-wrap:wrap}
#view-newsletter .nl-export-actions p{flex:1;min-width:0;margin:0;font-size:.85rem;overflow-wrap:anywhere}
#view-newsletter .nl-export-actions .button{width:auto;max-width:100%;white-space:normal}

#view-newsletter .nl-generate-actions{display:flex;justify-content:flex-end;margin-top:.65rem}
#view-newsletter .nl-generate-actions .button{width:auto;max-width:100%;white-space:normal}
#view-newsletter .nl-channel-editor .nl-candidate textarea{min-height:10rem}
#view-newsletter .nl-channel-editor .nl-history textarea{min-height:5rem}
#view-newsletter .nl-editor-actions{flex-wrap:wrap;gap:.65rem}
#view-newsletter .nl-editor-buttons{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem;min-width:0}
#view-newsletter .nl-editor-actions .button{width:auto;max-width:100%;white-space:normal;min-height:44px}

#view-newsletter .nl-ready-section{display:grid;gap:.5rem;margin-top:1rem}
#view-newsletter .nl-ready-section small{color:var(--muted);font-size:.8rem}

#view-newsletter .nl-shared-photo-note{margin:.35rem 0;font-size:.85rem;color:var(--club-text);line-height:1.5}
#view-newsletter .nl-live-preview{min-width:0;margin-top:.5rem}
#view-newsletter .nl-live-preview h4{margin:0 0 .65rem;font-size:.95rem}
#view-newsletter .nl-preview-post{max-width:36rem;border:1px solid var(--club-border);border-radius:1rem;overflow:hidden;background:var(--surface,#fff)}
#view-newsletter .nl-preview-club{display:block;padding:.85rem 1rem;border-bottom:1px solid var(--club-border);font-size:.85rem}
#view-newsletter .nl-preview-post p{padding:0 1rem;margin:1rem 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
#view-newsletter .nl-preview-post figure{margin:0}
#view-newsletter .nl-preview-post img{display:block;width:100%;height:auto;max-height:28rem;object-fit:contain;background:var(--club-subtle,#f7f9fb)}
#view-newsletter .nl-preview-post figcaption{padding:.6rem 1rem;font-size:.8rem;color:var(--muted);overflow-wrap:anywhere}
#view-newsletter .nl-preview-photo-empty,#view-newsletter .nl-preview-empty{color:var(--muted);font-size:.85rem}
#view-newsletter .nl-live-preview>small{display:block;margin-top:.5rem;color:var(--muted);font-size:.75rem;line-height:1.5}
#view-newsletter .nl-live-preview--print .nl-preview-post{max-width:none}
#view-newsletter .nl-live-preview [hidden]{display:none!important}
