@font-face {
  font-family: Poppins;
  src: url("/brand/poppins-semibold.woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Montserrat;
  src: url("/brand/montserrat-variable.woff2");
  font-weight: 100 900;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f7f7f7;
  color: #121214;
  font:
    15px/1.55 Montserrat,
    sans-serif;
}
header,
nav {
  padding-inline: max(calc((100vw - 1180px) / 2), 4vw);
}
header {
  height: 76px;
  background: #101012;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 16px;
}
.wordmark img {
  width: 88px;
}
.wordmark span {
  border-left: 1px solid #626267;
  padding-left: 16px;
  font:
    600 22px Poppins,
    sans-serif;
}
nav {
  background: white;
  display: flex;
  gap: 22px;
  border-bottom: 1px solid #ddd;
  overflow: auto;
}
button,
a,
input,
select {
  font: inherit;
}
button,
a.primary {
  cursor: pointer;
  text-decoration: none;
}
button {
  padding: 8px 13px;
  border-radius: 6px;
  border: 1px solid #ccc;
  color: inherit;
  background: transparent;
}
button:hover {
  background: #eee;
  color: #121214;
}
nav button {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 14px 3px;
  white-space: nowrap;
  font-weight: 600;
}
nav button[aria-current] {
  color: #a40b29;
  border-color: #cc1235;
}
main {
  width: 92%;
  max-width: 1180px;
  margin: 32px auto 80px;
}
.context,
small {
  font-size: 12px;
  font-weight: 600;
}
.context span {
  color: #cc1235;
  margin: 0 7px;
}
h1,
h2,
b {
  font-family: Poppins, sans-serif;
  font-weight: 600;
}
h1 {
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.15;
  letter-spacing: -0.045em;
  margin: 8px 0 22px;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.025em;
  margin: 0 0 15px;
}
section,
.login {
  background: #fff;
  border: 1px solid #e3e2e2;
  border-radius: 8px 22px 8px 8px;
  padding: 24px;
  margin-bottom: 18px;
}
.login {
  max-width: 460px;
}
.overview {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.featured {
  display: grid;
  grid-template-columns: 1fr 43%;
  background: #101012;
  color: white;
  border-radius: 8px 32px 8px 8px;
  overflow: hidden;
}
.featureText {
  padding: 30px;
  align-self: center;
}
.featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured h2 {
  font-size: clamp(25px, 3vw, 39px);
  line-height: 1.16;
  margin: 12px 0;
}
.featured p {
  color: #ddd;
  margin: 0 0 20px;
}
.counts {
  margin: 0;
}
.counts button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  border-top: 1px solid #eee;
  border-radius: 0;
  padding: 5px 0;
}
.counts b {
  font-size: 20px;
}
.primary {
  background: #cc1235;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 10px 15px;
  display: inline-block;
  font-weight: 600;
}
.primary:hover {
  background: #a40b29;
  color: #fff;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
.tablewrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th,
td {
  padding: 12px 8px;
  border-bottom: 1px solid #eee;
}
th {
  font-size: 12px;
  color: #625e60;
}
code {
  background: #f2f2f2;
  padding: 3px 6px;
  border-radius: 4px;
}
label {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  max-width: 560px;
  font-weight: 600;
}
input,
select {
  background: #fff;
  max-width: 100%;
  min-width: 0;
  padding: 9px;
  border: 1px solid #aaa;
  border-radius: 6px;
}
.mediaGrid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.mediaGrid li {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  padding: 12px;
}
.thumb {
  aspect-ratio: 16/9;
  background: #101012;
  margin: -12px -12px 10px;
}
.thumb img,
.thumb video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.mediaGrid strong {
  display: block;
  overflow-wrap: anywhere;
  margin-bottom: 8px;
}
a {
  color: #a40b29;
}
:focus-visible {
  outline: 3px solid #cc1235;
  outline-offset: 2px;
}
[role="alert"] {
  color: #a40b29;
}
ol li {
  margin: 8px;
}
@media (max-width: 760px) {
  .overview {
    grid-template-columns: 1fr;
  }
  .featureText,
  section {
    padding: 18px;
  }
  nav {
    gap: 14px;
  }
  main {
    margin-top: 20px;
  }
  .featured {
    grid-template-columns: 1fr 35%;
  }
  header {
    height: 62px;
  }
}
fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}
fieldset legend {
  font-weight: 600;
}
.inlineFields,
.resourceList > div,
.check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.resourceList > div {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}
.resourceList {
  margin-bottom: 16px;
}
.check {
  justify-content: flex-start;
}
input[type="color"] {
  height: 40px;
  width: 75px;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: #cc1235;
}
.resourceList button {
  min-width: 140px;
  text-align: left;
}
fieldset:disabled {
  opacity: 0.8;
}
.inlineFields input[type="number"] {
  width: 100px;
}

/* Allineamento delle testate e dimensione dei comandi del portale. */
button,
a.primary,
input:not([type="checkbox"]):not([type="radio"]),
select {
  min-height: 44px;
}
button,
a.primary {
  line-height: 1.35;
}
button,
.primary {
  padding-inline: 16px;
}
button:not(:disabled):focus-visible,
.resourceList a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline-offset: 3px;
}
label {
  font-size: 14px;
  gap: 7px;
  margin-block: 16px;
}
input,
select {
  font-size: 15px;
  color: #161616;
  font-weight: 500;
}
.pageHeading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 26px;
}
.pageHeading h1 {
  margin: 6px 0 0;
}
.pageHeading > label {
  min-width: 200px;
  margin: 0;
}
.context {
  color: #625e60;
}
.mobileNav {
  display: none;
}
nav {
  gap: 16px;
}
nav button {
  padding-inline: 5px;
}
main:has(.login) {
  max-width: 480px;
  margin: clamp(32px, 8vh, 86px) auto;
}
.login {
  max-width: none;
}
.login button {
  margin-top: 8px;
}
section {
  min-width: 0;
  padding: clamp(20px, 2.2vw, 32px);
  margin-bottom: 22px;
}
.counts {
  display: grid;
  align-content: start;
  gap: 8px;
}
.counts h2 {
  margin-bottom: 2px;
}
.counts button {
  padding: 7px 8px;
}
.editorLayout {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(0, 2fr);
  align-items: start;
  gap: 22px;
}
.resourcePanel {
  position: sticky;
  top: 16px;
}
.resourcePanel h2 {
  font-size: 18px;
}
.resourceList {
  margin: 0 0 18px;
}
.resourceList > div {
  align-items: start;
  padding-block: 12px;
  gap: 12px;
}
.resourceList button {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.resourceList button[aria-pressed="true"] {
  border-color: #cc1235;
  background: #fff;
  color: #a40b29;
  font-weight: 600;
}
.resourceList a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 6px;
}
.resourceList span {
  align-self: center;
  color: #625e60;
}
fieldset {
  margin: 0;
}
fieldset fieldset {
  margin-block: 22px;
}
.check {
  min-height: 44px;
  margin: 8px 0;
  cursor: pointer;
}
.check input {
  width: 18px;
  height: 18px;
  flex: none;
}
.inlineFields {
  gap: 12px 18px;
  align-items: end;
}
.sequence {
  padding: 0;
  list-style: none;
  counter-reset: slide;
}
.sequence > li {
  counter-increment: slide;
  border: 1px solid #e1dfe0;
  border-radius: 10px;
  padding: 18px;
  margin: 0 0 16px;
  background: #fafafa;
  overflow-wrap: anywhere;
}
.sequence > li > strong:before {
  content: counter(slide) ". ";
  color: #a40b29;
}
.actionRow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.editorFooter,
.integrationActions {
  padding-top: 18px;
  margin-top: 22px;
  border-top: 1px solid #e1dfe0;
}
.actionRow .danger {
  margin-inline-start: auto;
}
button.danger,
.mediaGrid li > button {
  border-color: #d9c7ca;
  color: #94223a;
  background: white;
}
button.danger:hover,
.mediaGrid li > button:hover {
  border-color: #a40b29;
  background: #f7f7f7;
}
.separateAction {
  display: block;
  margin-top: 22px;
}
.mediaGrid {
  gap: 20px;
}
.mediaGrid li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.mediaGrid .thumb {
  align-self: stretch;
}
.mediaGrid li > button {
  margin-top: auto;
}
th,
td {
  vertical-align: top;
}
.tablewrap {
  max-width: 100%;
}
.tablewrap th {
  white-space: nowrap;
}
@media (max-width: 880px) {
  .editorLayout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .resourcePanel {
    position: static;
  }
  nav {
    gap: 9px;
  }
  nav button {
    font-size: 14px;
  }
}
@media (max-width: 760px) {
  nav > button {
    display: none;
  }
  .mobileNav {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: none;
    margin: 8px 0;
  }
  .mobileNav select {
    flex: 1;
  }
  .pageHeading {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
  }
  .pageHeading > label {
    min-width: 0;
  }
  .sequence > li {
    padding: 14px;
  }
  .reorder {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .reorder button {
    padding: 8px;
  }
  .reorder .danger {
    grid-column: 1/-1;
    justify-self: start;
    margin: 2px 0 0;
  }
  .editorFooter .danger {
    margin-inline-start: auto;
  }
  .tablewrap {
    overscroll-behavior-inline: contain;
  }
  .inlineFields {
    align-items: stretch;
  }
  .sequence .inlineFields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
    margin: 10px 0 16px;
  }
  .sequence .inlineFields label {
    margin: 6px 0;
  }
  .sequence .inlineFields label:last-child {
    grid-column: 1/-1;
  }
  .sequence .inlineFields input,
  .sequence .inlineFields select {
    width: 100%;
  }
}

.playlistPreview {
  width: min(100%, 380px);
  aspect-ratio: 16 / 9;
  background: #101012;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin: 12px 0 16px;
}
.playlistPreview img, .playlistPreview video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.playlistPreview a { color: white; padding: 12px; }

.pickerGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
}
.pickerGrid li {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e1dfe0;
  border-radius: 8px;
}
.pickerGrid .playlistPreview {width:100%;margin:0}
.pickerGrid strong {overflow-wrap:anywhere}
.pickerGrid button {margin-top:auto}
.picker [role="status"]:empty {margin:0}

.portalShell {display:grid;grid-template-columns:224px minmax(0,1fr);min-height:100vh}
.portalShell>main {min-width:0;width:calc(100% - 64px);max-width:none}
.desktopSide,.mobileSide {background:white;color:#121214;padding:22px 14px;border:0;border-right:1px solid #e1dfe0}
.desktopSide {position:sticky;top:0;height:100dvh;display:flex;flex-direction:column;overflow-y:auto}
.sideHead {display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 6px 28px}
.sideMark {gap:10px}
.sideMark img {width:74px}
.sideMark span {padding-left:10px;font-size:19px;border-color:#d3d0d2}
.sideLinks {display:grid;padding:0;gap:8px;border:0;overflow:visible}
.sideLinks>button {display:flex;align-items:center;gap:12px;text-align:left;padding:10px 12px;border:0;border-radius:8px;font-size:14px;color:#49464a}
.sideLinks svg {width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.sideLinks>button[aria-current="page"] {background:#f7f7f7;color:#a40b29;box-shadow:inset 3px 0 #cc1235}
.sideAccount {margin-top:auto;padding:18px 8px 0;display:grid;gap:4px;border-top:1px solid #e1dfe0;overflow-wrap:anywhere}
.sideAccount small {color:#625e60}
.sideAccount button {justify-self:start;margin-top:10px}
.mobileBar,.mobileSide {display:none}
@media(min-width:901px) and (max-width:1160px){.editorLayout{grid-template-columns:minmax(195px,.8fr) minmax(0,2fr)}.portalShell>main{width:calc(100% - 36px)}}
@media(max-width:900px){
 .portalShell{display:block}
 .portalShell>main{width:92%}
 .desktopSide{display:none}
 .mobileBar{display:flex;height:64px;padding:0 4%;background:white;color:#121214;border-bottom:1px solid #e1dfe0}
 .mobileSide[open]{display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;margin:0;width:min(310px,92vw);height:100dvh;max-height:100dvh;max-width:none;overflow:auto}
 .mobileSide::backdrop{background:rgb(16 16 18 / .4)}
 body:has(.mobileSide[open]){overflow:hidden}
}

.sideHead {margin-bottom:18px}
.sideBrand {margin:0 6px 18px;padding-bottom:18px;border-bottom:1px solid #e1dfe0}
.sideBrand label,.sideBrand small {margin:0;font-size:12px;color:#625e60}
.sideBrand select {width:100%;font-size:14px}
.sideBrand strong {display:block;overflow-wrap:anywhere}

.entryCalendar { grid-column: 1 / -1; min-width: 0; border-block: 1px solid #d9d4de; padding: .7rem 0; }
.entryCalendar summary { cursor: pointer; font-weight: 650; }
.entryCalendar summary span { margin-inline-start: .5rem; font-size: .85em; font-weight: 450; overflow-wrap: anywhere; }
.entryCalendar p { font-size: .85rem; margin: .8rem 0; }
.calendarDates,.calendarSlot { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin: .8rem 0; }
.calendarDates label,.calendarSlot label { min-width: 0; flex: 1 1 8rem; }
.calendarDates input,.calendarSlot input { width: 100%; min-width: 0; }

@media (min-width: 901px) {
  .playlistPage .editorLayout { grid-template-columns: clamp(185px, 15vw, 260px) minmax(0, 1fr); gap: 16px; }
  .playlistPage .resourcePanel { padding: 18px; }
}
.sequence { container-type: inline-size; }
.sequence > li {
  position: relative; display: grid; align-items: center;
  grid-template-columns: 24px minmax(82px, 120px) minmax(0, 1fr) auto;
  grid-template-areas: "handle preview name actions" "handle preview fields actions" ". calendar calendar calendar";
  gap: 6px 12px; margin-bottom: 8px; padding: 10px 12px;
}
.sequence .dragHandle { grid-area: handle; text-align: center; font-size: 24px; color: #615c60; user-select: none; }
.dragHandle[draggable="true"] { cursor: grab; }
.dragHandle:active { cursor: grabbing; }
.sequence .dragSource { background: #f4edef; }
.sequence .dropBefore::before,.sequence .dropAfter::after {
  content: ""; position: absolute; inset-inline: 0; height: 3px; background: #a40b29; pointer-events: none;
}
.sequence .dropBefore::before { top: -5px; }
.sequence .dropAfter::after { bottom: -5px; }
.sequence > li > strong { grid-area: name; }
.sequence .playlistPreview { grid-area: preview; width: 100%; margin: 0; }
.sequence .inlineFields { grid-area: fields; display: grid; grid-template-columns: minmax(56px,.65fr) repeat(2,minmax(0,1fr)); gap: 6px; margin: 0; }
.sequence .inlineFields label { margin: 0; font-size: 12px; gap: 2px; min-width: 0; }
.sequence .inlineFields label:last-child { grid-column: auto; }
.sequence .inlineFields :is(input,select) { width: 100%; min-height: 32px; padding: 4px; }
.sequence .entryCalendar { grid-area: calendar; border-bottom: 0; padding: 6px 0 0; }
.sequence .reorder { grid-area: actions; display: flex; flex-wrap: nowrap; gap: 4px; margin: 0; }
.sequence .reorder button { min-height: 32px; min-width: 30px; padding: 3px 6px; margin: 0; }
@container (max-width: 650px) {
  .sequence > li { grid-template-columns: 22px 86px minmax(0,1fr); grid-template-areas: "handle preview name" "handle preview actions" ". fields fields" ". calendar calendar"; }
}
@container (max-width: 360px) {
  .sequence > li { grid-template-columns: 18px 65px minmax(0,1fr); grid-template-areas: "handle preview name" "actions actions actions" "fields fields fields" "calendar calendar calendar"; gap: 6px; padding: 8px; }
  .sequence .reorder { justify-content: flex-end; }
}

.uploadBox {border:1px dashed #aaa;border-radius:8px;padding:12px;margin-block:12px}
.uploadBox label {margin:0}
.replacePanel {grid-column:1/-1; grid-row:4; min-width:0}
.resourcePanel details,.editorLayout section > details {margin-top:16px}
@container (min-width:361px) and (max-width:650px){.replacePanel{grid-row:5}}
@container (max-width:360px){.replacePanel{grid-row:5}.sequence .reorder{flex-wrap:wrap}}
