/* Fortitude BJJ — Kiosk styles. Plain CSS, targeted at iOS 12 Safari (Safari 12) and up.
   No @layer, no :where(), no oklch(), no color-mix(), no `gap` on flex. */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #fafaf9;
  color: #1c1917;
  font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea, button {
  -webkit-user-select: auto;
  user-select: auto;
  font-family: inherit;
}

h1, h2, h3, h4 {
  font-family: "Oswald", "Open Sans", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

img { max-width: 100%; height: auto; display: block; }

/* ===== Layout primitives ===== */
.g-page {
  min-height: 100vh;
  padding: 16px;
}
@media (min-width: 600px) {
  .g-page { padding: 32px; }
}
.g-page--narrow {
  max-width: 720px;
  margin: 0 auto;
}

.g-header {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.g-header > * + * {
  margin-left: 16px;
}
@media (min-width: 600px) {
  .g-header { margin-bottom: 28px; }
}
.g-header__logo {
  width: 56px;
  height: 56px;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}
.g-header__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.g-header__title {
  font-size: 30px;
  line-height: 1.1;
}
.g-header__subtitle {
  color: #78716c;
  font-size: 16px;
  margin-top: 4px;
  font-family: "Open Sans", sans-serif;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.g-header__actions {
  margin-left: auto;
}

/* ===== Flash messages ===== */
.g-flash {
  padding: 14px 24px;
  font-size: 16px;
  text-align: center;
  border-bottom: 1px solid;
}
.g-flash--ok { background: #ecfdf5; color: #065f46; border-color: #6ee7b7; }
.g-flash--err { background: #fef2f2; color: #991b1b; border-color: #fca5a5; }

/* ===== Buttons ===== */
.g-btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  padding: 14px 22px;
  cursor: pointer;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
  text-decoration: none;
}

.g-btn--primary { background: #1c1917; color: #fff; }
.g-btn--primary:active { background: #44403c; }

.g-btn--ghost {
  background: transparent;
  color: #44403c;
  border-color: #d6d3d1;
}
.g-btn--ghost:active { background: #f5f5f4; }

.g-btn--block { display: block; width: 100%; }
.g-btn--large { font-size: 22px; padding: 18px 28px; }

/* ===== Class list (dashboard) ===== */
.g-class-list {
  display: -ms-grid;
  display: grid;
  grid-template-columns: 1fr;
  grid-row-gap: 14px;
}
@media (min-width: 900px) {
  .g-class-list {
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 14px;
  }
}

.g-class-card {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
}
.g-class-card:active { background: #fafaf9; border-color: #d6d3d1; }
.g-class-card__name {
  font-family: "Oswald", sans-serif;
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.g-class-card__meta {
  color: #78716c;
  font-size: 15px;
  margin-top: 4px;
}
.g-class-card__count {
  text-align: right;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  margin-left: 12px;
}
.g-class-card__count-num {
  font-family: "Oswald", sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}
.g-class-card__count-label {
  display: block;
  font-size: 11px;
  color: #78716c;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.g-empty {
  text-align: center;
  padding: 60px 20px;
  color: #78716c;
  background: #f5f5f4;
  border-radius: 16px;
}

/* ===== Roster (class show) ===== */
.g-roster {
  display: -ms-grid;
  display: grid;
  grid-template-columns: 1fr;
  grid-row-gap: 20px;
}
@media (min-width: 900px) {
  .g-roster {
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 24px;
  }
}

.g-pane {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 16px;
  padding: 20px;
}
.g-pane__heading { font-size: 22px; margin-bottom: 4px; }
.g-pane__sub { color: #78716c; font-size: 14px; margin-bottom: 16px; }

.g-row-list { list-style: none; padding: 0; margin: 0; }
.g-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  padding: 14px 12px;
  font-size: 19px;
  border-radius: 10px;
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: #1c1917;
}
.g-row + .g-row { margin-top: 2px; }
.g-row:active { background: #fafaf9; }
.g-row--card {
  background: #fff;
  border: 1px solid #e7e5e4;
  padding: 16px;
  margin-bottom: 8px;
}
.g-row--card:active { background: #fff7ed; border-color: #fcd34d; }
.g-row__tick { color: #059669; font-size: 22px; margin-right: 12px; }
.g-row__name {
  -webkit-flex: 1;
  flex: 1;
  font-weight: 600;
  margin-right: 12px;
}

.g-search {
  width: 100%;
  font-size: 18px;
  padding: 14px 16px;
  border: 1px solid #d6d3d1;
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
  -webkit-appearance: none;
  appearance: none;
}
.g-search:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Belt graphic is rendered inline-style via app/views/shared/_belt_pill.html.erb. */

/* ===== Forms ===== */
.g-field { margin-bottom: 18px; }
.g-field__label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #44403c;
  margin-bottom: 6px;
}
.g-field__input {
  display: block;
  width: 100%;
  font-size: 20px;
  padding: 14px 16px;
  border: 1px solid #d6d3d1;
  border-radius: 12px;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
}
.g-field__input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.g-form-grid {
  display: -ms-grid;
  display: grid;
  grid-template-columns: 1fr;
  grid-row-gap: 14px;
}
@media (min-width: 600px) {
  .g-form-grid {
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 14px;
    grid-row-gap: 0;
  }
}

.g-errors {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  color: #991b1b;
}
.g-errors ul { margin: 6px 0 0; padding-left: 20px; }

.g-form-actions {
  display: -webkit-flex;
  display: flex;
}
.g-form-actions > * + * { margin-left: 12px; }

/* ===== Confirmation modal ===== */
.g-modal-backdrop {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(28, 25, 23, 0.55);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  -webkit-transition: opacity 180ms ease;
  transition: opacity 180ms ease;
}
.g-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.g-modal {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  max-width: 440px;
  width: 100%;
}
.g-modal__title { font-size: 22px; margin-bottom: 8px; }
.g-modal__body {
  color: #44403c;
  margin-bottom: 22px;
  line-height: 1.4;
}
.g-modal__actions {
  display: -webkit-flex;
  display: flex;
}
.g-modal__actions > * { -webkit-flex: 1; flex: 1; }
.g-modal__actions > * + * { margin-left: 12px; }

/* ===== Signature canvas ===== */
.g-signature-wrap {
  background: #fff;
  border: 1px solid #d6d3d1;
  border-radius: 16px;
  padding: 8px;
  margin-bottom: 16px;
}
.g-signature-canvas {
  display: block;
  width: 100%;
  height: 260px;
  background: #fff;
  border-radius: 10px;
  touch-action: none;
}
.g-waiver-text {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 22px;
  line-height: 1.5;
  font-size: 16px;
  color: #292524;
}
.g-waiver-text p { margin: 0 0 12px; }
.g-waiver-text p:last-child { margin-bottom: 0; }
