/* Content Calendar: saved content beside the actual calendar, not before it.
   CSS-only responsive layout; all existing IDs and actions remain untouched. */
.scheduler-worktop{
 display:grid;
 grid-template-columns:minmax(210px,270px) minmax(0,1fr) minmax(240px,305px);
 gap:18px;
 align-items:start;
}
/* A wider calendar workspace keeps all seven days readable next to two side panels. */
main.scheduler-page{max-width:1510px}
.scheduler-main-column{min-width:0}
.scheduler-worktop .upcoming-sidebar{
 position:sticky;
 top:12px;
 align-self:start;
 margin-top:0;
 max-height:calc(100vh - 24px);
 max-height:calc(100dvh - 24px);
 overflow-y:auto;
 overscroll-behavior:contain;
 scrollbar-gutter:stable;
 padding:17px;
}
.scheduler-worktop .upcoming-sidebar .panel-header{
 display:flex;
 flex-direction:column;
 align-items:stretch;
 gap:10px;
 margin-bottom:12px;
}
.scheduler-worktop .upcoming-sidebar .panel-header h2{
 font-size:23px;
 line-height:1.16;
}
.scheduler-worktop .upcoming-sidebar .panel-header #refresh{align-self:flex-start}
.scheduler-worktop .upcoming-grid{
 display:grid;
 grid-template-columns:minmax(0,1fr);
 gap:9px;
 margin:10px 0 0;
}
.scheduler-worktop .upcoming-item{
 min-width:0;
 display:flex;
 flex-direction:column;
 align-items:stretch;
 gap:10px;
 padding:11px;
}
.scheduler-worktop .upcoming-item>div{min-width:0}
.scheduler-worktop .upcoming-item strong{
 overflow-wrap:anywhere;
 line-height:1.35;
}
.scheduler-worktop .upcoming-item small{white-space:normal;overflow-wrap:anywhere}
.scheduler-worktop .upcoming-item button{align-self:flex-end;max-width:100%;white-space:normal;text-align:center}
.scheduler-worktop .calendar-panel{width:100%;min-width:0}
.scheduler-worktop .library-main{
 position:sticky;
 top:12px;
 align-self:start;
 max-height:calc(100vh - 24px);
 max-height:calc(100dvh - 24px);
 overflow-y:auto;
 overscroll-behavior:contain;
 scrollbar-gutter:stable;
 margin-top:0!important;
 padding:18px!important;
}
.scheduler-worktop .library-main h2{font-size:24px;line-height:1.14}
.scheduler-worktop .library-main .panel-header{gap:10px;margin-bottom:12px}
.scheduler-worktop .library-main .panel-header .library-actions{width:100%;justify-content:space-between}
.scheduler-worktop .library-main .library-filter-label{margin:12px 0 10px}
.scheduler-worktop .library-grid{
 grid-template-columns:minmax(0,1fr);
 gap:9px;
 margin:10px 0 0;
}
.scheduler-worktop .library-asset{gap:9px;padding:9px}
.scheduler-worktop .library-thumb{width:67px;flex-basis:67px;min-height:94px}
.scheduler-worktop .library-asset-info{gap:5px}
.scheduler-worktop .library-asset-info strong{font-size:12px}
.scheduler-worktop .library-asset button{padding:7px 9px}
.scheduler-worktop .library-compose{margin-top:14px;padding:13px}
.scheduler-worktop .library-compose-body{grid-template-columns:minmax(0,1fr);gap:12px}
.scheduler-worktop .library-compose .panel-header{align-items:flex-start}
.scheduler-worktop .library-media{min-height:155px}
.scheduler-worktop .library-media img,
.scheduler-worktop .library-media video{max-height:260px}
.scheduler-worktop .library-fields textarea{min-height:100px}
.scheduler-support-panels{
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:18px;
 margin:19px 0;
 align-items:start;
}
.scheduler-support-panels>.panel{min-width:0}
.scheduler-support-panels>.panel h2{font-size:23px}
.scheduler-support-panels .account-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#scheduler-app>.summary{margin-top:19px}
@media(max-width:990px){
 /* Calendar first, planned posts second, saved media third on narrow screens. */
 .scheduler-worktop .upcoming-sidebar{
  order:1;
  position:static;
  max-height:none;
  overflow:visible;
  width:100%;
  margin-top:0;
 }
 .scheduler-worktop .upcoming-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  max-height:390px;
  overflow-y:auto;
  padding-right:5px;
 }
 .scheduler-worktop{display:flex;flex-direction:column;gap:16px}
 .scheduler-main-column{order:0;width:100%}
 .scheduler-worktop .library-main{
  order:2;position:static;max-height:none;overflow:visible;width:100%;
 }
 .scheduler-worktop .library-grid{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  max-height:380px;overflow-y:auto;overscroll-behavior:contain;
  padding-right:5px
 }
 .scheduler-worktop .library-compose-body{grid-template-columns:minmax(0,.85fr) minmax(0,1fr)}
 .scheduler-support-panels{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
 .scheduler-worktop .upcoming-grid{grid-template-columns:minmax(0,1fr)}
 .scheduler-worktop .upcoming-sidebar{padding:16px}

 .scheduler-worktop .library-grid{grid-template-columns:minmax(0,1fr)}
 .scheduler-worktop .library-compose-body{grid-template-columns:minmax(0,1fr)}
 .scheduler-support-panels{grid-template-columns:minmax(0,1fr)}
 .scheduler-worktop .library-main{padding:16px!important}
 .scheduler-worktop .library-main .panel-header{flex-direction:column}
}


/* Approved posts: collapsible real scheduling and publisher history.
   Both retain their original controls and data-bound IDs. */
#approved-posts-panel{min-width:0}
#approved-posts-panel .approved-post-accordions{
 display:grid;
 gap:12px;
 margin-top:20px;
}
#approved-posts-panel .approved-post-accordion{
 border:1px solid #dfc6e5;
 border-radius:13px;
 background:#fffafd;
 min-width:0;
 overflow:hidden;
}
#approved-posts-panel .approved-post-accordion>summary{
 list-style:none;
 display:flex;
 align-items:center;
 justify-content:space-between;
 gap:13px;
 padding:15px 16px;
 cursor:pointer;
 user-select:none;
 color:#4e205f;
 background:#f9f1fb;
}
#approved-posts-panel .approved-post-accordion>summary::-webkit-details-marker{display:none}
#approved-posts-panel .approved-post-accordion>summary:focus-visible{
 outline:3px solid #a66abc;
 outline-offset:-3px;
}
#approved-posts-panel .approved-post-accordion[open]>summary{
 border-bottom:1px solid #e4cfe9;
 background:#f4e7f8;
}
#approved-posts-panel .approval-summary-copy{
 display:flex;
 flex-direction:column;
 gap:3px;
 min-width:0;
}
#approved-posts-panel .approval-summary-copy strong{
 font-size:14px;
 font-weight:800;
 line-height:1.35;
}
#approved-posts-panel .approval-summary-copy small{
 color:#765e80;
 font-size:11px;
 line-height:1.4;
}
#approved-posts-panel .approval-chevron{
 font-size:23px;
 line-height:1;
 font-weight:700;
 color:#7a3789;
 flex:none;
 transition:transform .18s ease;
}
#approved-posts-panel .approved-post-accordion[open] .approval-chevron{
 transform:rotate(180deg);
}
#approved-posts-panel .approval-accordion-content{
 padding:17px;
 min-width:0;
}
#approved-posts-panel .approval-accordion-content .panel-header{
 display:flex;
 flex-direction:column;
 align-items:stretch;
 gap:10px;
 margin-bottom:13px;
}
#approved-posts-panel .approval-accordion-content .panel-header h2{
 font-size:22px;
 line-height:1.18;
}
#approved-posts-panel .approval-accordion-content .publish-pill{
 align-self:flex-start;
 white-space:normal;
 max-width:100%;
}
#approved-posts-panel .approval-accordion-content .publisher-note{
 font-size:12px;
 padding:11px 12px;
 overflow-wrap:anywhere;
}
#approved-posts-panel .approval-accordion-content .publish-media-preview{
 max-height:320px;
}
#approved-posts-panel .approval-accordion-content .publisher-visual,
#approved-posts-panel .approval-accordion-content .publish-media-preview video{
 max-height:310px;
}
#approved-posts-panel .approval-accordion-content .publish-account-list{
 grid-template-columns:minmax(0,1fr);
}
#approved-posts-panel .approval-accordion-content .publish-job{
 display:flex;
 flex-direction:column;
 align-items:stretch;
 gap:12px;
 overflow-wrap:anywhere;
 padding:12px;
}
#approved-posts-panel .approval-accordion-content .publish-job-actions{
 justify-content:flex-start;
}
#approved-posts-panel .approval-accordion-content .publish-jobs{
 max-height:550px;
 overflow-y:auto;
 overscroll-behavior:contain;
 scrollbar-gutter:stable;
 padding-right:4px;
}
#approved-posts-panel .approval-accordion-content .editor-actions{
 align-items:stretch;
}
#approved-posts-panel .approval-accordion-content .editor-actions .btn{
 max-width:100%;
 white-space:normal;
}
@media(max-width:650px){
 #approved-posts-panel .approval-accordion-content{padding:12px}
 #approved-posts-panel .approved-post-accordion>summary{padding:13px}
}
@media(prefers-reduced-motion:reduce){
 #approved-posts-panel .approval-chevron{transition:none}
}
