/* Top of the home page: dial, price display and drum. Delft-blue tiles behind it. */

.hero { background: var(--blue) var(--tiles-light); color: var(--white); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 56px; }
.hero-copy { display: grid; gap: 24px; align-content: center; padding-block: 72px; }
.hero .btn-line { border-color: var(--white); color: var(--white); }
.hero .btn-line:hover { background: rgba(255, 255, 255, .12); }

.machine { margin-top: 40px; color: var(--ink); background: #f6f8fc; border: 3px solid var(--navy); border-bottom: 0; border-radius: 14px 14px 0 0; }
.panel { display: grid; gap: 20px; padding: 24px; border-bottom: 3px solid var(--navy); }
.panel legend { padding: 0; font-weight: 700; margin-bottom: 12px; }

.dial { display: grid; grid-template-columns: minmax(0, 1fr) 132px minmax(0, 1fr); grid-template-rows: auto repeat(4, minmax(44px, auto)); gap: 4px 14px; align-items: center; }
.dial legend { grid-column: 1 / -1; grid-row: 1; float: left; width: 100%; }
.dial label { position: relative; display: flex; align-items: center; min-height: 44px; padding: 4px 10px; border-radius: 6px; line-height: 1.2; cursor: pointer; }
.dial label:hover { background: var(--white); }
.dial input, .times input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.dial label:has(:checked) { font-weight: 800; background: var(--white); box-shadow: inset 0 0 0 2px var(--navy), inset 4px 0 0 2px var(--red); }
.dial label:has(:focus-visible), .times label:has(:focus-visible) { outline: 3px solid var(--sky); outline-offset: 2px; }
.dial-1, .dial-2, .dial-3, .dial-4 { grid-column: 1; justify-content: flex-end; text-align: right; }
.dial-5, .dial-6, .dial-7, .dial-8 { grid-column: 3; }
.dial-1, .dial-5 { grid-row: 2; }
.dial-2, .dial-6 { grid-row: 3; }
.dial-3, .dial-7 { grid-row: 4; }
.dial-4, .dial-8 { grid-row: 5; }
.knob { grid-column: 2; grid-row: 2 / 6; justify-self: center; align-self: center; position: relative; width: 124px; aspect-ratio: 1; border-radius: 50%; border: 3px solid var(--navy); background: repeating-conic-gradient(#d4dcec 0 5deg, #f7f9fd 5deg 10deg); transition: rotate .45s cubic-bezier(.3, 1.5, .6, 1); rotate: -45deg; }
.knob::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: var(--white); border: 2px solid var(--navy); }
.knob::after { content: ""; position: absolute; left: calc(50% - 4px); top: 6px; width: 8px; height: 40px; border-radius: 4px; background: var(--red); border: 2px solid var(--navy); }
.panel:has(#d2:checked) .knob { rotate: -75deg; }
.panel:has(#d3:checked) .knob { rotate: -105deg; }
.panel:has(#d4:checked) .knob { rotate: -135deg; }
.panel:has(#d5:checked) .knob { rotate: 45deg; }
.panel:has(#d6:checked) .knob { rotate: 75deg; }
.panel:has(#d7:checked) .knob { rotate: 105deg; }
.panel:has(#d8:checked) .knob { rotate: 135deg; }

/* The display: red digits, like the lights on a real appliance. */
.display { background: var(--navy); color: #dfe7fb; border-radius: 6px; padding: 16px 18px; }
.display-row { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.readout { display: grid; gap: 6px; min-width: 190px; }
.readout-label { font-size: .875rem; line-height: 1.2; }
.amount { display: none; align-items: flex-end; gap: 8px; }
.panel:has(#t15:checked) .amount-15, .panel:has(#t30:checked) .amount-30, .panel:has(#t45:checked) .amount-45, .panel:has(#t60:checked) .amount-60 { display: flex; }
.euro { font-size: 1.6rem; font-weight: 700; line-height: 1; color: #ff6b74; }
.segments { height: 50px; width: auto; max-width: 100%; }
.segments .on { fill: #ff5b66; }
.segments .off { fill: #1f2d55; }
.display .times legend { font-weight: 400; font-size: .875rem; line-height: 1.2; margin-bottom: 8px; }
.times-row { display: flex; gap: 6px; }
.times label { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid #3d4f82; border-radius: 6px; font-weight: 700; font-variant-numeric: tabular-nums; }
.times label:has(:checked) { background: var(--red); border-color: var(--red); color: var(--white); }

.door { height: 250px; overflow: hidden; padding-top: 28px; }
.door-ring { width: min(420px, 84%); aspect-ratio: 1; margin-inline: auto; padding: 22px; border: 3px solid var(--navy); border-radius: 50%; background: var(--white); }
.door-ring canvas { display: block; width: 100%; height: 100%; border: 3px solid var(--navy); border-radius: 50%; background: var(--sky); }

/* Browsers from before 2022 cannot follow the dial and buttons: show the start price, hide the time buttons. */
@supports not selector(:has(*)) {
  .amount-15 { display: flex; }
  .display .times { display: none; }
}
