/* Aroma wheel modal - uses app CSS variables; body.dark-mode for theme */

.aroma-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 4500;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.aroma-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
}

body.dark-mode .aroma-modal__backdrop {
  background: rgba(4, 8, 18, 0.72);
}

.aroma-modal__panel {
  position: relative;
  width: 95vw;
  max-width: 95vw;
  height: 95dvh;
  max-height: 95dvh;
  background: var(--card-bg);
  border-radius: 0.5rem;
  box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text-color);
  font-size: 1.4rem;
}

body.dark-mode .aroma-modal__panel {
  box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, 0.45);
}

.aroma-modal__header {
  flex-shrink: 0;
  margin-bottom: 0.25rem;
}

.aroma-modal__title {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  color: var(--wine-text);
  line-height: 1.2;
  text-align: left;
}

.aroma-modal .wheel-view {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.aroma-modal .section-panel {
  flex: 3 1 0;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 0.35rem;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
}

.aroma-modal .section-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0.65rem 0.75rem;
}

.aroma-modal .section-wedge-img {
  width: min(100%, 20rem);
  height: auto;
  max-height: min(48dvh, 100%);
  flex: 0 0 auto;
  object-fit: contain;
  margin: 0 auto 0.5rem;
  display: block;
}

.aroma-modal .section-wedge-canvas {
  width: min(100%, 20rem);
  height: auto;
  aspect-ratio: 1;
  max-height: min(48dvh, 100%);
  flex: 0 0 auto;
  margin: 0 auto 0.5rem;
  display: block;
}

.aroma-modal .section-heading {
  margin: 0 0 0.25rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--wine-text);
  text-align: center;
  line-height: 1.2;
}

.aroma-modal .section-subtitle {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  color: color-mix(in srgb, var(--text-color) 72%, transparent);
}

.aroma-modal .section-aromas {
  margin: 0 0 0.65rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.aroma-modal .section-aroma-btn {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 1.25rem;
  line-height: 1.3;
  cursor: pointer;
  font-family: inherit;
}

.aroma-modal .section-aroma-btn.secondary {
  border-color: color-mix(in srgb, var(--wine-text) 45%, var(--border-color));
  background: color-mix(in srgb, var(--wine-text) 12%, var(--input-bg));
  color: var(--wine-text);
}

.aroma-modal .section-aroma-btn.primary {
  background: var(--primary);
  color: #fff;
}

.aroma-modal .section-aroma-btn.success {
  background: var(--success);
  color: #fff;
}

.aroma-modal .section-aroma-btn:hover,
.aroma-modal .section-aroma-btn:focus-visible {
  filter: brightness(0.94);
  outline: 2px solid var(--wine-text);
  outline-offset: 1px;
}

.aroma-modal .section-aroma-btn.primary:hover,
.aroma-modal .section-aroma-btn.primary:focus-visible,
.aroma-modal .section-aroma-btn.success:hover,
.aroma-modal .section-aroma-btn.success:focus-visible {
  outline-color: color-mix(in srgb, var(--wine-text) 70%, #fff);
}

.aroma-modal .section-aroma-btn:active {
  transform: scale(0.97);
}

.aroma-modal .section-note {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--text-color) 88%, transparent);
  text-align: center;
}

.aroma-modal .wheel-nav-row {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  touch-action: manipulation;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0.35rem 0 0.55rem;
  align-self: stretch;
}

.aroma-modal .wheel-spin-btn {
  flex: 0 0 auto;
  width: 3.75rem;
  height: 3.75rem;
  min-width: 3.75rem;
  min-height: 3.75rem;
  align-self: center;
  border: 2px solid transparent;
  border-radius: 0.55rem;
  background: var(--primary);
  color: #fff;
  font-size: clamp(2.25rem, 6vh, 3rem);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.aroma-modal .wheel-spin-btn:hover,
.aroma-modal .wheel-spin-btn:focus-visible {
  background: color-mix(in srgb, var(--primary) 88%, #000);
  color: #fff;
  outline: 2px solid var(--wine-text);
  outline-offset: 1px;
}

.aroma-modal .wheel-spin-btn:active {
  transform: scale(0.97);
}

.aroma-modal .wheel-mini-wrap {
  flex: 0 0 auto;
  width: min(52vw, 17rem);
  height: min(52vw, 17rem);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  border-radius: 50%;
  overflow: hidden;
}

.aroma-modal .wheel-mini-canvas {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 50%;
}

.aroma-modal .wheel-mini-canvas.is-dragging {
  cursor: grabbing;
}

@media (min-width: 768px) {
  .aroma-modal .wheel-mini-wrap {
    width: min(28vw, 18rem);
    height: min(28vw, 18rem);
  }
}

.aroma-wheel-overview {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 5;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.aroma-wheel-overview__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(2px);
}

body.dark-mode .aroma-wheel-overview__backdrop {
  background: rgba(4, 8, 18, 0.78);
}

.aroma-wheel-overview__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  max-width: 100%;
  max-height: 100%;
}

.aroma-wheel-overview__title {
  margin: 0;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--wine-text);
  text-align: center;
}

.aroma-wheel-overview__img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(88vw, 34rem);
  max-height: min(68dvh, 34rem);
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0.35rem 1.25rem rgba(0, 0, 0, 0.35);
}

.aroma-wheel-overview__close {
  flex-shrink: 0;
  min-width: 6rem;
}

.aroma-modal .section-card.slide-out-left {
  animation: aromaSlideOutLeft 140ms ease-in forwards;
}

.aroma-modal .section-card.slide-out-right {
  animation: aromaSlideOutRight 140ms ease-in forwards;
}

.aroma-modal .section-card.slide-in-right {
  animation: aromaSlideInRight 280ms ease-out;
}

.aroma-modal .section-card.slide-in-left {
  animation: aromaSlideInLeft 280ms ease-out;
}

@keyframes aromaSlideOutLeft {
  to { transform: translateX(-1.5rem); opacity: 0; }
}

@keyframes aromaSlideOutRight {
  to { transform: translateX(1.5rem); opacity: 0; }
}

@keyframes aromaSlideInRight {
  from { transform: translateX(1.5rem); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes aromaSlideInLeft {
  from { transform: translateX(-1.5rem); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Form thumb button */
.aroma-wheel-thumb-wrap {
  display: none;
  margin-top: 0.5rem;
  text-align: center;
}

.aroma-wheel-thumb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--input-bg);
  cursor: pointer;
  line-height: 0;
}

.aroma-wheel-thumb-btn:hover,
.aroma-wheel-thumb-btn:focus-visible {
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
  outline: 2px solid var(--wine-text);
  outline-offset: 2px;
}

.aroma-wheel-thumb-btn img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
  border-radius: 50%;
}

.aroma-wheel-thumb-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.25rem;
  opacity: 0.75;
  color: var(--text-color);
}
