/**
 * Dresium Try-On — CSS event-preset
 *
 * File estratto dal monolitico tryon.css nel M34 (2026-09-03).
 * Contiene solo le regole applicative del componente event-preset.
 * Caricato dal blocks/tryon.liquid via stylesheet_tag.
 *
 * NON aggiungere qui regole di altre modali — se serve, crea un file dedicato.
 */

.dresium-event-preset-modal {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  overflow: visible;
  margin: auto;
}

.dresium-event-preset-modal::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.dresium-event-preset-modal[open] {
  animation: dresium-result-fade-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dresium-event-preset-modal *, .dresium-event-preset-modal *::before, .dresium-event-preset-modal *::after {
  box-sizing: border-box;
}

.dresium-event-preset-modal [hidden] {
  display: none !important;
}

.dresium-event-preset-modal__container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px 28px 28px;
  background: var(--dresium-tryon-white, #ffffff);
  border-radius: var(--dresium-tryon-radius, 20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  width: min(92vw, 560px);
  max-height: 92vh;
  overflow-y: auto;
  font-family: var(--dresium-tryon-font-body);
}

.dresium-event-preset-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.04);
  color: #111;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.dresium-event-preset-modal__close:hover {
  background: rgba(0, 0, 0, 0.08);
}

.dresium-event-preset-modal__title {
  font-family: var(--dresium-tryon-font-display);
  font-size: 22px;
  font-weight: 600;
  color: #111;
  margin: 0;
  text-align: center;
  letter-spacing: -0.01em;
}

.dresium-event-preset-modal__subtitle {
  font-size: 13px;
  color: var(--dresium-tryon-gray-500, #6b7280);
  margin: 0;
  text-align: center;
  line-height: 1.5;
}

.dresium-event-preset-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dresium-event-preset-modal__preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  background: var(--dresium-tryon-white, #ffffff);
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--dresium-tryon-radius, 14px);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  font-family: var(--dresium-tryon-font-body);
  color: #111;
}

.dresium-event-preset-modal__preset:hover {
  border-color: var(--dresium-tryon-primary, #4362db);
  background: var(--dresium-tryon-primary-alpha-08, rgba(67, 98, 219, 0.03));
  transform: translateY(-1px);
}

.dresium-event-preset-modal__preset[aria-checked="true"] {
  border-color: var(--dresium-tryon-primary, #4362db);
  background: var(--dresium-tryon-primary-alpha-08, rgba(67, 98, 219, 0.08));
  box-shadow: 0 0 0 3px var(--dresium-tryon-primary-alpha-12, rgba(67, 98, 219, 0.12));
}

.dresium-event-preset-modal__preset-icon {
  color: var(--dresium-tryon-primary, #4362db);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dresium-event-preset-modal__preset-label {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

.dresium-event-preset-modal__custom-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px dashed rgba(0, 0, 0, 0.15);
  border-radius: var(--dresium-tryon-radius, 10px);
  cursor: pointer;
  font-family: var(--dresium-tryon-font-body);
  font-size: 13px;
  font-weight: 600;
  color: #555;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.dresium-event-preset-modal__custom-toggle:hover {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.3);
}

.dresium-event-preset-modal__custom-toggle[aria-expanded="true"] .dresium-event-preset-modal__chevron {
  transform: rotate(180deg);
}

.dresium-event-preset-modal__chevron {
  transition: transform 0.2s ease;
}

.dresium-event-preset-modal__custom-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #f7f8fa;
  border-radius: var(--dresium-tryon-radius, 10px);
}

.dresium-event-preset-modal__custom-hint {
  font-size: 12px;
  color: var(--dresium-tryon-gray-500, #6b7280);
  margin: 0;
  font-style: italic;
}

.dresium-event-preset-modal__custom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dresium-event-preset-modal__custom-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
}

.dresium-event-preset-modal__custom-field select {
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: var(--dresium-tryon-radius, 8px);
  background: var(--dresium-tryon-white, #ffffff);
  font-family: var(--dresium-tryon-font-body);
  font-size: 13px;
  font-weight: 400;
  color: #111;
  cursor: pointer;
}

.dresium-event-preset-modal__custom-field select:focus {
  outline: none;
  border-color: var(--dresium-tryon-primary, #4362db);
  box-shadow: 0 0 0 3px rgba(67, 98, 219, 0.12);
}

.dresium-event-preset-modal__continue {
  margin-top: 4px;
  padding: 14px 20px;
  background: var(--dresium-tryon-gradient, var(--dresium-tryon-primary, #4362db));
  color: var(--dresium-tryon-white, #ffffff);
  border: 0;
  border-radius: var(--dresium-tryon-radius, 12px);
  font-family: var(--dresium-tryon-font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--dresium-tryon-primary-alpha-32, rgba(76, 110, 245, 0.32));
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}

.dresium-event-preset-modal__continue:hover {
  box-shadow: 0 6px 18px rgba(76, 110, 245, 0.42);
}

.dresium-event-preset-modal__continue:active {
  transform: translateY(1px);
}


@media (max-width: 968px) {
  .dresium-event-preset-modal__container {
      width: 100vw;
      max-width: 100vw;
      height: 100vh;
      max-height: 100vh;
      border-radius: 0;
      padding: 48px 20px 24px;
    }
  .dresium-event-preset-modal__custom-grid {
      grid-template-columns: 1fr;
    }
}


