/* Emotion wheel page: layout of the page top and the look of the tool.
   Behaviour comes from js/emotion-wheel.js; this file loads only on that page. */

/* ---------- Page top: the tool is on the first screen ----------
   Wide screens: the title on the left, the wheel on the right. Narrow screens: title, the wheel, then the text
   (visual order only, the markup is untouched). */
/* In a grid, a block centred with auto margins shrinks to its content; these keep their full width as before */
html:root .practice-page > section { width: 100%; }
html:root .practice-page > .ew-band { border-radius: 20px; background: var(--panel, #f5f2f3); padding: 22px 24px 24px; }
@media (min-width: 1000px) {
  html:root .practice-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  html:root .practice-page > * { grid-column: 1 / -1; }
  html:root .practice-page > .practice-head { grid-column: 1; grid-row: 2; }
  html:root .practice-head h1 { font-size: clamp(34px, 3.5vw, 46px); }
  html:root .practice-page > .ew-band { grid-column: 2; grid-row: 2; margin: 44px 32px 24px 8px; }
}
@media (max-width: 999px) {
  html:root .practice-page { display: grid; grid-template-columns: minmax(0, 1fr); }
  html:root .practice-page > * { order: 7; }
  html:root .practice-page > .practice-topbar { order: 0; }
  html:root .practice-page > .practice-head { display: contents; }
  html:root .practice-head > .eyebrow-cat { order: 1; margin: 44px 24px 12px; }
  html:root .practice-head > h1 { order: 2; margin: 0 24px 18px; }
  html:root .practice-page > .ew-band { order: 3; margin: 0 16px; padding: 18px 14px 20px; }
  html:root .practice-head > .lead { order: 4; margin: 30px 24px 0; }
  html:root .practice-head > .practice-meta { order: 5; margin: 24px 24px 0; }
}

/* ---------- The tool ---------- */
.ew { min-height: 440px; color: var(--ink, #0b0b0d); font-family: var(--head, inherit); }
.ew-app { display: grid; }
.ew-view { display: grid; justify-items: center; gap: 14px; text-align: center; }
.ew-view[hidden] { display: none; }
.ew-view.is-in { animation: ewIn .35s ease both; }
@keyframes ewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html:root .ew-q { margin: 0; max-width: 30ch; font-size: 18px; font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; color: var(--ink, #0b0b0d); outline: none; text-wrap: balance; }
.ew-dot { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 50%; border: 1px solid rgba(11, 11, 13, .5); vertical-align: baseline; }
html:root .ew-hint { margin: -6px 0 0; font-size: 14px; color: var(--muted, #4b4b56); }

.ew-wheel { position: relative; width: min(100%, 360px, 48vh); aspect-ratio: 1; }
.ew-wheel svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ew-petal { stroke: #0b0b0d; stroke-width: 1.1; stroke-linejoin: round; cursor: pointer; transition: fill-opacity .25s ease; fill-opacity: .82; }
.ew-petal.is-hot { fill-opacity: 1; stroke-width: 2; }
.ew-pet { position: absolute; transform: translate(-50%, -50%); min-width: 44px; min-height: 44px; padding: 4px 2px; border: 0; background: transparent; color: #0b0b0d; font-family: var(--head, inherit); font-size: clamp(11.5px, 3.3vw, 14px); font-weight: 500; line-height: 1.1; cursor: pointer; border-radius: 10px; }
.ew-pet:focus-visible, .ew-chip:focus-visible, .ew-btn:focus-visible, .ew-link:focus-visible { outline: 2px solid #0b0b0d; outline-offset: 2px; }
html:root .ew-basket { margin: 0; font-size: 14px; color: var(--muted, #4b4b56); }

.ew-link { justify-self: start; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--ink, #0b0b0d); font-family: var(--head, inherit); font-size: 14px; text-decoration: underline; text-decoration-color: rgba(11, 11, 13, .3); text-underline-offset: 4px; cursor: pointer; }
.ew-link:hover { text-decoration-color: currentColor; }
.ew-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 440px; }
.ew-chip, .ew-btn { min-height: 46px; padding: 0 20px; border-radius: 100px; border: 1px solid var(--hair2, rgba(11, 11, 13, .3)); background: #fffdfb; color: #0b0b0d; font-family: var(--head, inherit); font-size: 15px; font-weight: 500; cursor: pointer; transition: border-color .25s ease; }
.ew-chip:hover, .ew-btn:hover { border-color: #0b0b0d; }
.ew-btn { background: transparent; }
.ew-btn[hidden] { display: none; }

.ew-picked { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.ew-word { font-family: 'Caveat', cursive; font-weight: 500; font-size: clamp(34px, 9vw, 44px); line-height: 1.15; padding: 0 6px; background: linear-gradient(transparent 58%, var(--ew-c, #d9dde3) 58%, var(--ew-c, #d9dde3) 92%, transparent 92%); }
.ew-says { display: grid; gap: 10px; max-width: 46ch; text-align: left; }
html:root .ew-says p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text, #1d1d22); }
html:root .ew-says .ew-do-line { font-size: 15px; color: var(--muted, #4b4b56); }
.ew-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }

/* ---------- The list of groups in the article (also the data the tool reads) ---------- */
html:root .ew-list h3 { margin: 24px 0 4px; font-size: 20px; font-weight: 500; line-height: 1.25; letter-spacing: -0.02em; }
html:root .ew-list .ew-say { margin: 0 0 4px; }
html:root .ew-list .ew-words { margin: 0; color: var(--muted, #4b4b56); }
html:root .ew-list .ew-do { margin: 4px 0 0; font-size: 15px; color: var(--muted, #4b4b56); }

@media (prefers-reduced-motion: reduce) {
  .ew-view.is-in { animation: none; }
  .ew-petal, .ew-chip, .ew-btn { transition: none; }
}
