/* CHECK OUT TRAINING: Shared card and stats components, history editing, key settings and checkout confirmation. */

.modal[hidden] { display: none; }

.modal { inset: 0px; z-index: 100; display: grid; place-items: center; backdrop-filter: blur(8px); background: rgba(29, 67, 84, 0.44); }
.stats-card { width: min(760px, 100%); max-height: min(90vh, 900px); overflow-y: auto; border: 1px solid rgb(207, 227, 235); padding: clamp(22px, 5vw, 34px); color: rgb(23, 54, 70); background: rgb(255, 255, 255); box-shadow: rgba(24, 72, 94, 0.25) 0px 30px 90px; }

.modal-kicker { color: rgb(22, 135, 184); }
.stats-card h2 { margin: 4px 0px 20px; color: rgb(18, 61, 80); text-shadow: none; transform: none; }
.stats-modal-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.close-btn { width: 40px; height: 40px; border: 0px; color: rgb(84, 113, 127); background: rgb(237, 245, 248); font-size: 25px; cursor: pointer; }
.stats-comparison { overflow: hidden; border: 1px solid rgb(217, 232, 238); }
.stats-row { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(100px, 1.25fr) minmax(90px, 1fr); align-items: center; min-height: 42px; border-bottom: 1px solid rgb(229, 238, 242); text-align: center; }
.stats-row:last-child { border-bottom: 0px; }
.stats-row:nth-child(2n) { background: rgb(247, 250, 252); }
.stats-row.header { min-height: 52px; color: rgb(255, 255, 255); background: linear-gradient(135deg, rgb(38, 172, 216), rgb(22, 132, 178)); font-weight: 400; }
.stats-label { color: rgb(106, 133, 146); font-size: 11px; font-weight: 400; letter-spacing: 0.04em; }
.stats-number { color: rgb(23, 63, 82); font-size: 16px; font-weight: 400; }
.result-card { width: min(760px, 100%); max-height: min(90vh, 900px); overflow-y: auto; border: 1px solid rgb(207, 227, 235); padding: clamp(22px, 5vw, 34px); color: rgb(23, 54, 70); background: rgb(255, 255, 255); box-shadow: rgba(24, 72, 94, 0.25) 0px 30px 90px; text-align: center; }
.win-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
@media (max-width: 540px) {
  .stats-row { grid-template-columns: minmax(72px, 1fr) minmax(90px, 1.15fr) minmax(72px, 1fr); }
  .stats-label { font-size: 9px; }
  .stats-number { font-size: 13px; }
}
.stats-note { margin: 12px 0px 0px; color: rgb(106, 133, 146); font-size: 10px; line-height: 1.5; text-align: center; font-weight: 400; }
.stats-card { border-radius: 0px; }
.result-card { border-radius: 0px; }
.close-btn { border-radius: 0px; }
.stats-comparison { border-radius: 0px; }
.checkout-darts-card { width: min(420px, 100%); text-align: center; }
.checkout-darts-card h2 { font-size: 20px; }
.checkout-darts-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0px; }
.checkout-darts-choices .btn { min-height: 56px; font-size: 17px; }
#historyEditForm { width: min(720px, 100%); max-height: 90dvh; overflow: auto; }
#historyEditRows { display: grid; gap: 8px; margin-block: 20px; }
.history-edit-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid rgb(187, 187, 187); color: rgb(23, 37, 44); }
.history-edit-row input { width: 110px; min-height: 48px; font-size: 24px; color: rgb(23, 37, 44); background: rgb(255, 255, 255); border: 1px solid rgb(136, 136, 136); padding: 6px; }
#historyEditError { color: rgb(180, 37, 42); }
#keySettingsForm { width: min(680px, 100%); max-height: 90dvh; overflow: auto; }
.key-setting-row { display: flex; align-items: center; gap: 12px; margin-block: 14px; }
.key-setting-row strong { width: 40px; flex-shrink: 0; }

.key-setting-row select { flex: 1 1 0%; min-width: 0px; min-height: 44px; padding: 8px; color: rgb(23, 37, 44); background: white; border: 1px solid rgb(136, 147, 153); }

.key-setting-row input { min-height: 44px; padding: 8px; color: rgb(23, 37, 44); background: white; border: 1px solid rgb(136, 147, 153); width: 90px; }
#keySettingsStatus { color: rgb(180, 37, 42); }
.modal { position: absolute; max-width: 100%; padding: 10px; }
.modal > form { max-height: calc(100cqh - 20px); overflow: auto; }
.modal > .stats-card { max-height: calc(100cqh - 20px); overflow: auto; }
.modal > .result-card { max-height: calc(100cqh - 20px); overflow: auto; }
