/* IDH Ads — inserzioni in rotazione, checkout, editor e pannello. */

/* ---- Rotazione: le inserzioni stanno sovrapposte, una sola visibile ---- */
.idh-rot { display: grid; width: 100%; justify-items: center; }
.idh-slide { grid-area: 1 / 1; width: 100%; display: flex; justify-content: center; visibility: hidden; opacity: 0; transition: opacity .5s ease; }
.idh-slide.is-on { visibility: visible; opacity: 1; }
.idh-adg { width: 100%; display: flex; justify-content: center; overflow: hidden; }
.idh-dev { width: 100%; display: flex; justify-content: center; }
.idh-dev.idh-dev-m { display: none; }
@media (max-width: 767px) { .idh-dev.idh-dev-d { display: none; } .idh-dev.idh-dev-m { display: flex; } }
.idh-dev > .idh-adc { margin: 0 auto; }

/* ---- Scheda inserzione ---- */
.idh-adc { --bg: #16304A; --fg: #fff; position: relative; display: flex; width: 100%; box-sizing: border-box; overflow: hidden; border-radius: 8px; background: var(--bg); color: var(--fg);
  text-decoration: none; font-family: inherit; line-height: 1.25; container-type: inline-size; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.idh-adc:hover .idh-adc-cta { filter: brightness(.92); }
.idh-adc-img { display: block; flex: none; background: rgba(255, 255, 255, .12); overflow: hidden; }
.idh-adc-img:empty { display: none; }
.idh-adc-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.idh-adc-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.idh-adc-h { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-weight: 800; }
.idh-adc-t { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: .88em; opacity: .92; }
.idh-adc-cta { flex: none; align-self: flex-start; padding: 8px 16px; border-radius: 6px; background: var(--fg); color: var(--bg); font-weight: 800; font-size: 13px; white-space: nowrap; }

.idh-adc--wide { flex-direction: row; align-items: stretch; }
.idh-adc--wide .idh-adc-img { width: 24%; }
.idh-adc--wide .idh-adc-body { flex: 1; justify-content: center; padding: 14px 22px; }
.idh-adc--wide .idh-adc-h { font-size: 26px; -webkit-line-clamp: 2; }
.idh-adc--wide .idh-adc-t { font-size: 15px; }
.idh-adc--wide .idh-adc-cta { align-self: center; margin-right: 22px; padding: 11px 22px; font-size: 15px; }
.idh-adc--compact .idh-adc-img { width: 31%; }
.idh-adc--compact .idh-adc-body { padding: 8px 10px; }
.idh-adc--compact .idh-adc-h { font-size: 15px; }
.idh-adc--compact .idh-adc-cta { margin-right: 10px; padding: 7px 10px; font-size: 12px; }

.idh-adc--box, .idh-adc--tall { flex-direction: column; }
.idh-adc--box .idh-adc-img { height: 46%; }
.idh-adc--tall .idh-adc-img { height: 40%; }
.idh-adc--box .idh-adc-body, .idh-adc--tall .idh-adc-body { flex: 1; padding: 14px 16px 6px; }
.idh-adc--box .idh-adc-h { font-size: 19px; }
.idh-adc--tall .idh-adc-h { font-size: 24px; }
.idh-adc--tall .idh-adc-t { font-size: 15px; -webkit-line-clamp: 6; }
.idh-adc--box .idh-adc-cta, .idh-adc--tall .idh-adc-cta { margin: 6px 16px 16px; }

@media (min-width: 768px) and (max-width: 1100px) { .idh-adc--wide .idh-adc-h { font-size: 20px; } .idh-adc--wide .idh-adc-t { font-size: 13px; } }

/* ---- Checkout ---- */
.idh-co { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; max-width: 1080px; margin: 0 auto; color: #1A1410; }
.idh-co * { box-sizing: border-box; }
.idh-co-lead { font-size: 17px; margin: 0 0 24px; }
.idh-st { border-top: 1px solid #E4DACB; padding: 26px 0; }
.idh-st h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 22px; line-height: 1.2; }
.idh-st h2 span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #16304A; color: #fff; font-size: 15px; }
.idh-co-side { position: sticky; top: 130px; }
.idh-sum { border: 1px solid #E4DACB; border-radius: 12px; padding: 20px; background: #FBF7F1; }
.idh-sum h3 { margin: 0 0 12px; font-size: 18px; }
.idh-q { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; margin: 0 0 14px; font-size: 15px; }
.idh-q dt { color: #6B5F55; } .idh-q dd { margin: 0; text-align: right; font-weight: 600; }
.idh-q-tot { margin-top: 6px; padding-top: 10px; border-top: 1px solid #E4DACB; color: #1A1410 !important; font-size: 17px; font-weight: 800 !important; }
.idh-hint { margin: 8px 0 0; font-size: 13px; color: #6B5F55; }
.idh-err { margin: 14px 0 0; padding: 12px 14px; border-radius: 8px; background: #FCE8E6; color: #8A1C12; font-weight: 600; }
.idh-notice { margin: 0 0 16px; padding: 12px 14px; border-radius: 8px; background: #EAF1F8; color: #16304A; font-size: 14px; }
.idh-notice-test { background: #FFF4D6; color: #6B4A00; }
.idh-notice-ok { background: #E6F3E7; color: #1E5B22; }

.idh-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.idh-slot { cursor: pointer; }
.idh-slot input { position: absolute; opacity: 0; pointer-events: none; }
.idh-slot-in { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px 16px; border: 2px solid #E4DACB; border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.idh-slot-in strong { font-size: 16px; } .idh-slot-in small { color: #6B5F55; font-size: 13px; line-height: 1.35; }
.idh-slot-fmt { margin-top: 4px; font-size: 13px; }
.idh-slot-price { margin-top: auto; padding-top: 6px; font-weight: 800; color: #C4521F; } .idh-slot-price small { font-weight: 500; }
.idh-slot input:checked + .idh-slot-in { border-color: #C4521F; box-shadow: 0 0 0 3px rgba(196, 82, 31, .15); }
.idh-slot input:focus-visible + .idh-slot-in { outline: 3px solid #16304A; outline-offset: 2px; }

.idh-f { display: flex; flex-direction: column; gap: 5px; margin: 0 0 14px; font-size: 14px; font-weight: 600; }
.idh-f small, .idh-f em { font-weight: 400; color: #6B5F55; font-style: normal; }
.idh-f input[type=text], .idh-f input[type=email], .idh-f input[type=tel], .idh-f input[type=url], .idh-f input[type=date], .idh-f textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #CDBFAD; border-radius: 8px; background: #fff; font: inherit; font-weight: 400; color: #1A1410; }
.idh-f input:focus, .idh-f textarea:focus { outline: 2px solid #16304A; outline-offset: 1px; border-color: #16304A; }
.idh-f input[type=file] { font-weight: 400; font-size: 14px; }
.idh-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.idh-chk { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 14px; line-height: 1.45; cursor: pointer; }
.idh-chk input { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: #16304A; }

.idh-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.idh-mode label { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border: 2px solid #E4DACB; border-radius: 12px; cursor: pointer; background: #fff; }
.idh-mode label:has(input:checked) { border-color: #C4521F; box-shadow: 0 0 0 3px rgba(196, 82, 31, .15); }
.idh-mode input { margin-top: 3px; accent-color: #C4521F; }
.idh-mode span { display: flex; flex-direction: column; gap: 2px; } .idh-mode small { color: #6B5F55; font-size: 13px; }

.idh-edgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.idh-ed { margin: 0 0 14px; padding: 14px 16px 4px; border: 1px solid #E4DACB; border-radius: 12px; min-width: 0; }
.idh-ed legend { padding: 0 8px; font-weight: 800; font-size: 15px; } .idh-ed-size { color: #6B5F55; font-weight: 500; font-size: 13px; }
.idh-sw { display: flex; gap: 10px; flex-wrap: wrap; }
.idh-sw label { cursor: pointer; } .idh-sw input { position: absolute; opacity: 0; }
.idh-sw i { display: block; width: 30px; height: 30px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.idh-sw input:checked + i { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), 0 0 0 3px #fff, 0 0 0 5px #16304A; }
.idh-sw input:focus-visible + i { outline: 2px solid #16304A; outline-offset: 4px; }
.idh-prev { margin: 8px 0 4px; }
.idh-tabs { display: flex; gap: 4px; }
.idh-tabs button { padding: 9px 16px; border: 1px solid #E4DACB; border-bottom: 0; border-radius: 8px 8px 0 0; background: #F4EDE3; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.idh-tabs button.is-on { background: #fff; color: #C4521F; }
.idh-prev-box { padding: 20px; border: 1px solid #E4DACB; border-radius: 0 8px 8px 8px; background: #fff; overflow-x: auto; }
.idh-prev-box .idh-adc { margin: 0 auto; }

.idh-btn { display: block; width: 100%; margin-top: 8px; padding: 15px 20px; border: 0; border-radius: 10px; background: #C4521F; color: #fff; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; }
.idh-btn:hover { filter: brightness(.93); } .idh-btn:disabled { opacity: .6; cursor: wait; }
.idh-status { max-width: 640px; margin: 0 auto; } .idh-st-state { padding: 14px 16px; border-radius: 10px; background: #EAF1F8; font-weight: 600; }
.idh-st-approved { background: #E6F3E7; } .idh-st-rejected, .idh-st-cancelled { background: #FCE8E6; }
.idh-st-state + .idh-q { margin-top: 18px; }

/* ---- Norme ---- */
.idh-rules { max-width: 760px; margin: 0 auto; line-height: 1.65; }
.idh-rules h2 { margin: 30px 0 8px; font-size: 20px; color: #16304A; }
.idh-rules-meta { color: #6B5F55; font-size: 14px; }
.idh-rules li { margin: 4px 0; }

/* ---- Pannello ---- */
.idh-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #EAF1F8; color: #16304A; font-size: 12px; }
.idh-pill-pending { background: #FFF4D6; color: #6B4A00; } .idh-pill-approved { background: #E6F3E7; color: #1E5B22; }
.idh-pill-rejected, .idh-pill-cancelled { background: #FCE8E6; color: #8A1C12; }
.idh-flags { margin: 0 0 12px; padding: 10px 12px; border-left: 4px solid #b32d2e; background: #FCF0EF; } .idh-flags ul { margin: 6px 0 0 18px; list-style: disc; }
.idh-adm-slot { max-width: 900px; margin: 0 0 18px; padding: 4px 18px 6px; border: 1px solid #c3c4c7; border-radius: 6px; background: #fff; }
#idh-admin-ed .idh-ed .idh-f { font-size: 13px; }

@media (max-width: 900px) {
  .idh-co { grid-template-columns: 1fr; gap: 0; } .idh-co-side { position: static; order: -1; margin-bottom: 8px; }
}
@media (max-width: 640px) {
  .idh-slots, .idh-row2, .idh-mode, .idh-edgrid { grid-template-columns: 1fr; }
}

/* ---- Passaggi ---- */
.idh-steps { display: flex; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.idh-steps li { flex: 1; min-width: 0; }
.idh-steps button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 4px solid #E4DACB; background: none; font: inherit; font-weight: 700; font-size: 14px; color: #8A7E73; text-align: left; cursor: default; }
.idh-steps b { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: #E4DACB; color: #fff; font-size: 13px; }
.idh-steps span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idh-steps .is-done button { color: #16304A; border-color: #16304A; cursor: pointer; } .idh-steps .is-done b { background: #16304A; }
.idh-steps .is-cur button { color: #C4521F; border-color: #C4521F; } .idh-steps .is-cur b { background: #C4521F; }
.idh-wiz .idh-st[hidden] { display: none; }
.idh-wiz .idh-st > h2 { display: none; }
.idh-wiz .idh-st { border-top: 0; padding-top: 14px; }
.idh-nav { display: flex; gap: 12px; justify-content: flex-end; margin-top: 18px; }
.idh-nav .idh-btn { width: auto; min-width: 150px; margin-top: 0; }
.idh-nav .idh-btn:last-child { flex: 1; max-width: 360px; }
.idh-btn-ghost { background: none !important; color: #16304A !important; border: 2px solid #CDBFAD !important; }
.idh-draft { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; background: #EAF1F8; color: #16304A; font-size: 14px; }
.idh-draft button { padding: 0; border: 0; background: none; color: #C4521F; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.idh-step-err { margin-bottom: 0; }
@media (max-width: 640px) { .idh-steps span { display: none; } .idh-steps button { justify-content: center; } .idh-nav { flex-direction: column-reverse; } .idh-nav .idh-btn, .idh-nav .idh-btn:last-child { max-width: none; width: 100%; } }
