/* Coffee Tavern — Customer-facing Reservations */
:root {
  --res: #e75481;
  --res-soft: #fce4ec;
  --res-mid: #f8b8cc;
  --res-dark: #c4285d;
  --res-text: #3b1425;
  --bg: #fdf8f3;
  --card-bg: #ffffff;
  --border: #e8ddd4;
  --muted: #7a6c65;
  --text: #2d2a26;
  --success: #065f46;
  --success-bg: #d1fae5;
  --error: #991b1b;
  --error-bg: #fee2e2;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

.res-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.res-header {
  background: var(--res);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.res-header__logo {
  display: block;
  height: 48px;
  width: auto;
}
.res-header__title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  text-align: right;
}

/* Steps indicator */
.res-steps {
  background: var(--res-soft);
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow-x: auto;
}
.res-step {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}
.res-step__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--res-mid);
  color: #fff;
  font-weight: 800;
  font-size: .82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.res-step--active .res-step__dot {
  background: var(--res);
  box-shadow: 0 0 0 3px var(--res-soft), 0 0 0 5px var(--res);
}
.res-step--done .res-step__dot {
  background: var(--res-dark);
}
.res-step__label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: .4rem;
}
.res-step--active .res-step__label {
  color: var(--res-dark);
  font-weight: 700;
}
.res-step__connector {
  width: 32px;
  height: 2px;
  background: var(--res-mid);
  margin: 0 .25rem;
  flex-shrink: 0;
}

/* Main container */
.res-main {
  flex: 1;
  padding: 2rem 1rem;
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

.res-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(60, 20, 30, .06);
  margin-bottom: 1.25rem;
}
.res-card__title {
  margin: 0 0 1.25rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--res-dark);
}

/* Form elements */
.res-field {
  margin-bottom: 1.1rem;
}
.res-field label {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .4rem;
}
.res-field input[type=text],
.res-field input[type=email],
.res-field input[type=tel],
.res-field input[type=number],
.res-field select,
.res-field textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  font-size: 1rem;
  background: #faf7f5;
  color: var(--text);
  transition: border-color .15s;
}
.res-field input:focus,
.res-field select:focus,
.res-field textarea:focus {
  outline: none;
  border-color: var(--res);
  background: #fff;
}
.res-field textarea {
  min-height: 80px;
  resize: vertical;
}
.res-field--inline {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.res-field--inline label {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: .95rem;
  color: var(--text);
}
.res-field--inline input[type=checkbox] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--res);
  flex-shrink: 0;
}
.res-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .5rem;
}
.res-checkbox-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .85rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
  cursor: pointer;
  font-size: .9rem;
}
.res-checkbox-item input {
  accent-color: var(--res);
  flex-shrink: 0;
}
.res-checkbox-item:has(input:checked) {
  border-color: var(--res);
  background: var(--res-soft);
}

/* Slot grid */
.res-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: .5rem;
  max-height: 240px;
  overflow-y: auto;
  padding: .5rem .25rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: #faf7f5;
}
.res-slot {
  padding: .55rem .4rem;
  border: 1px solid var(--border);
  border-radius: .55rem;
  background: var(--card-bg);
  font-size: .9rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all .12s;
}
.res-slot:hover {
  border-color: var(--res);
  background: var(--res-soft);
  color: var(--res-dark);
}
.res-slot--selected {
  border-color: var(--res);
  background: var(--res);
  color: #fff;
}
input[type=radio].res-slot-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Buttons */
.res-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 2rem;
  background: var(--res);
  color: #fff;
  border: 0;
  border-radius: .85rem;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: background .12s;
  width: 100%;
  text-align: center;
}
.res-btn:hover { background: var(--res-dark); }
.res-btn--secondary {
  background: transparent;
  color: var(--res-dark);
  border: 2px solid var(--res);
}
.res-btn--secondary:hover { background: var(--res-soft); }

/* Alerts */
.res-alert {
  padding: .85rem 1rem;
  border-radius: .75rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.res-alert--error { background: var(--error-bg); color: var(--error); border: 1px solid #fca5a5; }
.res-alert--success { background: var(--success-bg); color: var(--success); border: 1px solid #6ee7b7; }
.res-alert--info { background: var(--res-soft); color: var(--res-dark); border: 1px solid var(--res-mid); }

/* Summary box */
.res-summary {
  background: var(--res-soft);
  border: 1px solid var(--res-mid);
  border-radius: .85rem;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.1rem;
}
.res-summary__row {
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  padding: .25rem 0;
  font-size: .95rem;
}
.res-summary__label {
  color: var(--muted);
  font-weight: 600;
}
.res-summary__value {
  font-weight: 700;
  color: var(--res-dark);
  text-align: right;
}
.res-ref {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--res);
  text-align: center;
  letter-spacing: .05em;
  margin: .75rem 0;
}

/* Code input */
.res-code-wrap {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin: 1rem 0;
}
.res-code-input {
  width: 50px;
  height: 58px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  border: 2px solid var(--border);
  border-radius: .65rem;
  background: #faf7f5;
  color: var(--text);
  transition: border-color .12s;
}
.res-code-input:focus {
  outline: none;
  border-color: var(--res);
  background: #fff;
}

/* Footer */
.res-footer {
  background: var(--res-soft);
  border-top: 1px solid var(--res-mid);
  padding: 1rem 1.5rem;
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
}

@media (max-width: 480px) {
  .res-main { padding: 1rem .5rem; }
  .res-card { padding: 1.1rem; }
  .res-step__label { display: none; }
}
