/* The calendar shows actual deliveries separately from forecast automation slots. */
#calendar-page { min-width: 0; }
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 4px 0 16px; flex-wrap: wrap; }
.cal-navigation { display: flex; gap: 10px; align-items: center; }
.cal-navigation h2 { font-size: 17px; letter-spacing: -.4px; margin: 0; }
.cal-navigation > .icon-button { width: 32px; height: 36px; font-size: 18px; }
.cal-navigation > .button { margin-left: 6px; }
.cal-view-switch { display: flex; padding: 4px; background: #e9ecf2; border-radius: 10px; gap: 3px; }
.cal-view-switch button { border: 0; background: transparent; color: #68717d; border-radius: 7px; padding: 8px 17px; font: inherit; font-size: 13px; cursor: pointer; }
.cal-view-switch button[aria-pressed="true"] { background: #fff; color: #253c34; box-shadow: 0 1px 4px #2637490c; }
.cal-hint { display: flex; align-items: center; gap: 7px; color: #798391; font-size: 12px; margin-bottom: 15px; }
.cal-hint .icon { width: 14px; height: 14px; flex-shrink: 0; }
.cal-mobile-hint { display: none; }
.cal-scroller { overflow-x: auto; border: 1px solid #dfe3eb; border-radius: 14px; background: #fff; scrollbar-width: thin; }
.cal-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); min-width: 1050px; align-items: stretch; }
.cal-weekday { padding: 12px; text-align: center; color: #7d8591; font-size: 11px; font-weight: 600; letter-spacing: .8px; background: #fafbfc; border-bottom: 1px solid #e3e6ed; text-transform: uppercase; }
.cal-day { position: relative; min-width: 0; min-height: 218px; border-right: 1px solid #e6e9ef; border-bottom: 1px solid #e6e9ef; padding: 10px 8px 13px; transition: background .15s, box-shadow .15s; }
.cal-grid[data-view="month"] .cal-day { min-height: 180px; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:nth-last-child(-n+7) { border-bottom: 0; }
.cal-date { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 10px; min-height: 28px; }
.cal-date time { display: inline-flex; justify-content: center; align-items: center; min-width: 28px; height: 28px; font-size: 13px; font-weight: 600; color: #536072; border-radius: 8px; }
.cal-date > span { font-size: 10px; color: #678875; }
.cal-day.is-today { background: #f6faf7; }
.cal-day.is-today time { background: #286c52; color: white; }
.cal-day.outside-month { background: #f7f8fa; }
.cal-day.outside-month .cal-date time { color: #a3aab4; }
.cal-day-posts { display: grid; gap: 8px; }
.cal-tile { border: 1px solid #dfe4e9; border-radius: 9px; background: #fff; min-width: 0; box-shadow: 0 2px 4px #26374904; }
.cal-tile.is-movable { cursor: grab; }
.cal-tile.is-movable:active { cursor: grabbing; }
.cal-tile:hover { border-color: #a9bfb1; box-shadow: 0 3px 10px #26374909; }
.cal-card-open { padding: 8px; width: 100%; display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 8px; text-align: left; align-items: start; border: none; background: transparent; color: inherit; font: inherit; cursor: inherit; border-radius: inherit; }
.cal-tile:not(.is-movable) .cal-card-open { cursor: pointer; }
.cal-thumb { width: 100%; aspect-ratio: 9/16; display: flex; align-items: center; justify-content: center; background: #e9ecf1; overflow: hidden; border-radius: 5px; }
.cal-thumb img,.cal-thumb video { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.cal-card-copy { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.cal-card-time { display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: #788291; line-height: 1.2; }
.cal-card-time .icon { width: 12px; height: 12px; }
.cal-grip { color: #9ca6b0; font-size: 14px; line-height: .8; }
.cal-card-copy > strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; font-weight: 550; color: #364353; line-height: 1.4; overflow-wrap: anywhere; }
.cal-platforms { display: inline-flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.cal-platform { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; color: #303540; }
.cal-platform.instagram { color: #d6539b; }
.cal-platform.youtube { color: #f44d55; }
.cal-platform .icon { width: 15px; height: 15px; }
.cal-status { color: #6d8278; font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.cal-tile.needs-attention { border-color: #e8d4b0; }
.cal-tile.needs-attention .cal-status { color: #996a27; }
.cal-tile.is-cancelled { opacity: .55; }
.cal-planned { border: 1px dashed #d8dfd5; border-radius: 9px; padding: 9px; color: #83917b; background: #f8faf5; display: grid; gap: 7px; }
.cal-planned > span:first-child { display: flex; align-items: center; gap: 5px; font-size: 10px; }
.cal-planned .icon { width: 12px; height: 12px; }
.cal-planned small { margin-left: auto; font-size: 9px; }
.cal-planned > strong { font-weight: 450; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-planned .cal-platform { opacity: .7; }
.cal-day.cal-drop-target { background: #e5f0e8; box-shadow: inset 0 0 0 2px #77a087; }
.cal-dragging { opacity: .4; }
.cal-drop-label { display: none; position: absolute; bottom: 8px; left: 0; width: 100%; text-align: center; color: #286c52; font-size: 11px; pointer-events: none; }
.cal-drop-target .cal-drop-label { display: block; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 20px; font-size: 11px; color: #798391; margin-top: 18px; }
.cal-legend > span { display: inline-flex; gap: 7px; align-items: center; }
.cal-legend i { width: 7px; height: 7px; background: #6d9b81; border-radius: 50%; }
.cal-legend i.planned { background: #e7ecd9; }
.cal-loading { min-height: 340px; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; color: #788291; font-size: 13px; border: 1px solid #e0e3eb; border-radius: 14px; background: #fff; }
.cal-spinner { width: 22px; height: 22px; border: 2px solid #e0e7df; border-top-color: #286c52; border-radius: 50%; animation: cal-spin .7s linear infinite; }
.cal-empty { margin: 16px 0 0; font-size: 13px; color: #798391; }
.cal-details { display: grid; grid-template-columns: minmax(120px,190px) minmax(0,1fr); gap: 24px; align-items: start; }
.cal-detail-media { aspect-ratio: 9/16; border-radius: 10px; overflow: hidden; background: #101820; }
.cal-detail-media video,.cal-detail-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cal-detail-date { font-weight: 550; color: #364353; margin: 0 0 16px; font-size: 14px; }
.cal-detail-date small { display: block; font-weight: 400; color: #798391; margin-top: 5px; font-size: 11px; }
.cal-deliveries { display: grid; gap: 14px; margin-bottom: 22px; }
.cal-delivery { display: flex; align-items: center; gap: 10px; }
.cal-delivery > div { flex: 1; min-width: 0; }
.cal-delivery strong { display: block; font-size: 12px; font-weight: 550; overflow-wrap: anywhere; }
.cal-delivery small { display: block; font-size: 10px; margin-top: 3px; color: #798391; }
.cal-delivery .icon-button { width: 25px; height: 25px; }
@keyframes cal-spin { to { transform: rotate(360deg); } }
@media(min-width:1600px) { .cal-card-open { grid-template-columns: 54px minmax(0,1fr); gap: 10px; padding: 9px; } .cal-card-copy > strong { font-size: 12px; } }
@media(max-width:800px) { .cal-desktop-hint { display: none; } .cal-mobile-hint { display: inline; } .cal-toolbar { gap: 12px; } .cal-navigation { gap: 5px; } .cal-navigation h2 { font-size: 14px; } .cal-navigation > .button { margin-left: 2px; padding: 8px 10px; } #calendar-page .page-title-row { gap: 16px; } .cal-view-switch { margin-left: auto; } .cal-legend { gap: 12px; } }
@media(max-width:460px) { .cal-details { grid-template-columns: 1fr; gap: 18px; } .cal-detail-media { width: 160px; margin-inline: auto; } .cal-navigation h2 { font-size: 13px; } .cal-navigation > .icon-button { width: 26px; } }
@media(prefers-reduced-motion:reduce) { .cal-spinner { animation: none; } .cal-day { transition: none; } }
