/* Eventi public form */
.eventi-notice { padding: 14px 18px; border-radius: 8px; background: #f3f6f9; color: #34495e; }

.ev-app {
  --ev-accent: #8aa6c1; --ev-text: #14304a; --ev-bg: #f5f8fb;
  --ev-font: 'Mulish', system-ui, sans-serif; --ev-head-font: 'Jost', system-ui, sans-serif;
  --ev-line: color-mix(in srgb, var(--ev-accent) 55%, #fff);
  --ev-soft: color-mix(in srgb, var(--ev-accent) 14%, #fff);
  box-sizing: border-box; width: 100%; padding: clamp(14px, 3vw, 36px);
  background: var(--ev-bg); color: var(--ev-text); font-family: var(--ev-font); font-size: var(--ev-size, 16px); line-height: 1.45;
}
.ev-app *, .ev-app *::before, .ev-app *::after { box-sizing: border-box; }
.ev-ico { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; margin-right: .4em; }

/* Card + frames */
.ev-card { position: relative; max-width: var(--ev-max, 980px); margin: 0 auto; background: var(--ev-card, #fff); padding: clamp(20px, 4vw, 48px); border-radius: var(--ev-radius, 6px); box-shadow: 0 10px 40px rgba(20, 48, 74, .07); }
.ev-frame-simple .ev-card, .ev-frame-flourish .ev-card { outline: 2px solid var(--ev-line); outline-offset: -10px; border: 3px double var(--ev-line); }
.ev-fl { position: absolute; width: clamp(70px, 12vw, 130px); color: var(--ev-accent); pointer-events: none; line-height: 0; }
.ev-fl--tl { top: -18px; left: -18px; }
.ev-fl--br { bottom: -18px; right: -18px; transform: rotate(180deg); }
.ev-swirl { width: 100%; height: auto; }

.ev-head { text-align: center; margin-bottom: 22px; }
.ev-align-left .ev-head { text-align: left; }
.ev-align-left .ev-intro { margin-left: 0; }
.ev-head:empty { display: none; }
.ev-sec-desc { margin: -4px 0 12px; opacity: .75; }
.ev-title { font-family: var(--ev-head-font); font-weight: 600; font-size: clamp(26px, 5vw, 44px); line-height: 1.15; margin: 0 0 8px; color: var(--ev-text); }
.ev-intro { margin: 0 auto; max-width: 620px; opacity: .8; }
.ev-decor { display: block; margin: 10px auto 0; max-width: 220px; height: auto; }

/* Steps */
.ev-steps { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 0 0 22px; }
.ev-stepbtn { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 1px solid var(--ev-line); border-radius: 999px; background: #fff; color: var(--ev-text); font: inherit; cursor: pointer; transition: .2s; }
.ev-stepnum { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ev-soft); font-weight: 700; font-size: 13px; }
.ev-stepbtn.is-on { background: var(--ev-accent); border-color: var(--ev-accent); color: #fff; }
.ev-stepbtn.is-on .ev-stepnum { background: rgba(255, 255, 255, .25); }
.ev-stepbtn.is-done .ev-stepnum { background: var(--ev-accent); color: #fff; }
.ev-steplbl { display: inline-flex; align-items: center; }

/* Sections */
.ev-sec { margin-bottom: 26px; }
.ev-layout-stepper .ev-sec:not(.ev-active) { display: none; }
.ev-sec-h { display: flex; align-items: center; margin: 0 0 12px; font-family: var(--ev-head-font); font-size: 22px; font-weight: 600; color: var(--ev-text); }
.ev-layout-accordion .ev-sec { border: 1px solid var(--ev-line); border-radius: 8px; overflow: hidden; margin-bottom: 12px; }
.ev-layout-accordion .ev-sec-h { width: 100%; margin: 0; padding: 14px 18px; background: var(--ev-soft); border: 0; cursor: pointer; text-align: left; color: var(--ev-text); }
.ev-layout-accordion .ev-sec-h span { flex: 1; }
.ev-layout-accordion .ev-sec-b { padding: 16px 18px; }
.ev-layout-accordion .ev-sec:not(.ev-open) .ev-sec-b { display: none; }
.ev-chev { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: .2s; }
.ev-layout-accordion .ev-open .ev-chev { transform: rotate(-135deg); }

.ev-grid-head, .ev-row { display: grid; grid-template-columns: repeat(var(--ev-cols, 2), minmax(0, 1fr)) 34px; gap: 10px; align-items: center; }
.ev-grid-head { padding: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: color-mix(in srgb, var(--ev-text) 70%, #fff); }
.ev-grid-head i, .ev-lbl i { color: #c0392b; font-style: normal; margin-left: 2px; }
.ev-row { margin-bottom: 8px; }
.ev-lbl { display: none; font-size: 12px; font-weight: 700; margin-bottom: 3px; }

.ev-app input[type=text], .ev-app input[type=number], .ev-app input[type=email], .ev-app input[type=tel], .ev-app input[type=date], .ev-app input[type=time], .ev-app select, .ev-app textarea {
  width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--ev-line); border-radius: min(var(--ev-radius, 6px), 14px); background: #fff; color: var(--ev-text); font: inherit; box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.ev-app textarea { resize: vertical; }
.ev-app input:focus, .ev-app select:focus, .ev-app textarea:focus { outline: none; border-color: var(--ev-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ev-accent) 28%, transparent); }
.ev-app input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--ev-accent); }
.ev-invalid input, .ev-invalid select, .ev-invalid textarea { border-color: #d9534f; background: #fff8f8; }

.ev-del { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: color-mix(in srgb, var(--ev-text) 55%, #fff); font-size: 22px; line-height: 1; cursor: pointer; transition: .15s; }
.ev-del:hover { background: #fdecea; color: #c0392b; }

.ev-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border: 1px solid var(--ev-accent); border-radius: 999px; background: var(--ev-accent); color: #fff; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: .15s; }
.ev-btn:hover { filter: brightness(.94); }
.ev-btn:disabled { opacity: .4; cursor: not-allowed; }
.ev-ghost { background: transparent; color: var(--ev-text); border-color: var(--ev-line); }
.ev-sec-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.ev-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 4px; }
.ev-stepof { font-size: 13px; opacity: .7; }

.ev-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--ev-soft); font-size: 13px; }
.ev-dot { width: 9px; height: 9px; border-radius: 50%; background: #b8c4cf; }
.ev-dot.is-ok { background: #2e9e6a; } .ev-dot.is-warn { background: #e0a030; } .ev-dot.is-err { background: #d9534f; }
.ev-dot.is-busy { background: var(--ev-accent); animation: ev-pulse 1s infinite; }
.ev-note { opacity: .55; }
.ev-foot-btns { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ev-import { margin: 0; }

/* Animations */
@keyframes ev-pulse { 50% { opacity: .3; } }
@keyframes ev-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ev-slide { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes ev-zoom { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes ev-flip { from { opacity: 0; transform: perspective(700px) rotateX(-14deg); } to { opacity: 1; transform: none; } }
.ev-anim-fade .ev-sec, .ev-anim-fade .ev-new, .ev-anim-fade .ev-head { animation: ev-fade .45s ease both; }
.ev-anim-slide .ev-sec, .ev-anim-slide .ev-new, .ev-anim-slide .ev-head { animation: ev-slide .45s ease both; }
.ev-anim-zoom .ev-sec, .ev-anim-zoom .ev-new, .ev-anim-zoom .ev-head { animation: ev-zoom .4s ease both; }
.ev-anim-flip .ev-sec, .ev-anim-flip .ev-new, .ev-anim-flip .ev-head { animation: ev-flip .5s ease both; transform-origin: top; }
@media (prefers-reduced-motion: reduce) { .ev-app * { animation: none !important; transition: none !important; } }

/* Wireframe view */
.ev-wire, .ev-wire .ev-card { background: #fff !important; color: #555 !important; font-family: ui-monospace, Menlo, monospace !important; }
.ev-wire * { box-shadow: none !important; border-radius: 2px !important; border-color: #999 !important; background-image: none; }
.ev-wire .ev-card, .ev-wire .ev-sec, .ev-wire .ev-row, .ev-wire .ev-head, .ev-wire .ev-cell, .ev-wire .ev-steps, .ev-wire .ev-nav, .ev-wire .ev-foot { outline: 1px dashed #aaa; outline-offset: 2px; }
.ev-wire input, .ev-wire select, .ev-wire textarea { background: repeating-linear-gradient(45deg, #f4f4f4, #f4f4f4 6px, #fff 6px, #fff 12px) !important; }
.ev-wire .ev-btn, .ev-wire .ev-stepbtn, .ev-wire .ev-sec-h { background: #eee !important; color: #444 !important; }
.ev-wire .ev-fl, .ev-wire .ev-decor { display: none; }

/* Mobile: rows become cards */
@media (max-width: 680px) {
  .ev-grid-head { display: none; }
  .ev-row { grid-template-columns: 1fr 34px; padding: 12px; border: 1px solid var(--ev-soft); border-radius: 8px; background: color-mix(in srgb, var(--ev-accent) 5%, #fff); }
  .ev-row .ev-cell { grid-column: 1; }
  .ev-row .ev-del { grid-column: 2; grid-row: 1; align-self: start; }
  .ev-lbl { display: flex; align-items: center; }
  .ev-steplbl { display: none; }
  .ev-stepbtn { padding: 6px; }
  .ev-foot-btns { margin-left: 0; width: 100%; }
}

/* Read-only preview variant */
.ev-view .ev-grid-head, .ev-view .ev-row { grid-template-columns: repeat(var(--ev-cols, 2), minmax(0, 1fr)); }
.ev-val { display: flex; align-items: center; min-height: 42px; padding: 8px 12px; border-radius: min(var(--ev-radius, 6px), 14px); background: var(--ev-soft); overflow-wrap: anywhere; }
.ev-dash { opacity: .35; }
.ev-view .ev-lbl { display: none; }

/* Private (access code) variant */
.ev-lockbox { max-width: 380px; margin: 0 auto; text-align: center; padding: 8px 0 14px; }
.ev-lockico { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--ev-soft); color: var(--ev-accent); margin-bottom: 8px; }
.ev-lockico .ev-ico { width: 26px; height: 26px; margin: 0; }
.ev-lockform { display: flex; gap: 8px; }
.ev-lockform input { flex: 1; }
.ev-lockerr { min-height: 1.4em; margin: 8px 0 0; color: #c0392b; font-weight: 600; }

@media (max-width: 680px) {
  .ev-view .ev-row { grid-template-columns: 1fr; }
  .ev-view .ev-lbl { display: flex; align-items: center; }
  .ev-lockform { flex-direction: column; }
}
