/* ===== Rider only ===== */

/* Base variables */
:root { --primary: #222; --secondary: #f5f5f5; }

/* Body and container come from shared */

/* Simple form layout */
label { display: block; font-weight: 600; margin: 10px 0 6px; }

/* Inputs */
input[type="text"], input[type="email"], textarea {
  width: 100%; padding: 10px; margin-bottom: 15px; border: 1px solid #ccc; border-radius: 6px; font-size: 15px;
}

/* Buttons */
button { background: var(--rider-btn-colour, var(--btn-rider-bg, var(--primary))); color: var(--rider-btn-text-colour, var(--btn-rider-text, #fff)); padding: 10px 16px; border: 1px solid var(--rider-btn-border-color, var(--primary)); border-radius: 8px; cursor: pointer; }
button:hover { background: var(--rider-btn-colour-hover, var(--btn-rider-bg-hover, var(--rider-btn-colour, var(--primary)))); color: var(--rider-btn-text-colour-hover, var(--rider-btn-text-colour, #fff)); border-color: var(--rider-btn-border-color-hover, var(--rider-btn-border-color, var(--primary))); }

.message { margin-top: 15px; color: #d00; }

/* Region selection modal */
#regionModal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
}
#regionModal .box { background: #fff; padding: 20px; border-radius: 8px; max-width: 400px; width: 90%; }
#regionModal ul { list-style: none; padding: 0; margin: 0; }
#regionModal li { margin: 10px 0; }
#regionModal a { display: block; padding: 10px 15px; background: #28a745; color: #fff; border-radius: 4px; text-align: center; text-decoration: none; }
#regionModal a:hover { background: #1e7e34; }

/* Rider theming hooks (no unsupported attr() usage) */
.rider-body { background: var(--bg, #fff); color: var(--ink, #111); }

/* Containers and sections */
.rider-container { max-width: 960px; margin: 24px auto; padding: 0 12px; }
.rider-header    { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.rider-logo      { max-height: 56px; }

/* Cards and alerts */
.card  { background: var(--card-bg, #fff); color: var(--card-text, var(--ink, #111)); border-color: var(--card-border-color, #ddd); border-width: var(--card-border-width, 1px); border-style: var(--card-border-style, solid); border-radius: var(--card-radius, 8px); padding: 16px; box-shadow: 0 1px 2px color-mix(in srgb, var(--shadow-color, #000) 8%, transparent); }
.alert { padding: 12px 14px; border-radius: 6px; margin-bottom: 12px; }
.alert.error   { background: #ffe5e5; color: #7a0000; border: 1px solid #ffabab; }
.alert.success { background: #e8f8ec; color: #0d5f2a; border: 1px solid #b8e6c6; }

/* Grid */
.grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }

/* Rounds and forms */
.rounds { border: 1px solid #eee; padding: 12px; border-radius: 8px; margin: 16px 0; }
.round-item { margin-bottom: 12px; }
.round-check { display: block; font-weight: 600; margin-bottom: 6px; }
.reason { width: 100%; min-height: 70px; }

.rounds-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.rounds-table th, .rounds-table td { border: 1px solid #eee; padding: 8px; vertical-align: top; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #eee; font-size: 12px; }
.badge.status-pending       { background: #ffc107; }
.badge.status-approved      { background: #28a745; }
.badge.status-denied        { background: #dc3545; }
.badge.status-rider_updated { background: #e6f0ff; }
.badge.status-more_info     { background: #17a2b8; }
.badge.status-appealed      { background: #f0e6ff; }

.muted  { color: var(--muted, #666); font-size: 13px; }
.inline { display: flex; align-items: center; gap: 10px; margin-top: 8px; }

/* Lists and tables */
.page-wrap { max-width: 1000px; margin: 2rem auto; padding: 0 1rem; }
.header { display:flex; align-items:center; justify-content:space-between; margin-bottom:1rem; }
.btn { display:inline-block; padding:.5rem .75rem; border-radius:.375rem; text-decoration:none; border:1px solid #ccc; background:#fff; }
.btn-primary { background:#0a66c2; color:#fff; border-color:#0a66c2; }
.btn-ghost { background:#fff; color:#333; }
table { width:100%; border-collapse:collapse; }
th, td { padding:.625rem; border-bottom:1px solid #e5e7eb; text-align:left; vertical-align:middle; }
th { font-weight:600; }
.actions a { margin-right:.5rem; }
.empty { padding:2rem; text-align:center; color:#555; border:1px dashed #ddd; border-radius:.5rem; } /* fixed typo */
.pagination { display:flex; gap:.5rem; margin-top:1rem; }
.muted { color:var(--muted, #666); }

/* Rider index */
.wrap { max-width:1100px; margin:2rem auto; padding:0 1rem; }
.regions { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:1rem; }
.card img { max-width:100%; max-height:70px; object-fit:contain; margin-bottom:.5rem; }
.btn + .btn { margin-left:.5rem; }
.helper { color:var(--muted, #555); margin:.5rem 0 1rem; }

/* Rider login */
.notice { padding:.7rem 1rem; border-radius:.375rem; margin:.75rem 0; } /* from shared visual */

.request-form .choice-row{display:flex;flex-wrap:wrap;gap:1rem;align-items:center;margin:.25rem 0 .5rem}
.request-form .choice-row .choice{display:inline-flex;gap:.35rem;align-items:center}
.round-card + .round-card{border-top:1px solid rgba(0,0,0,.1);margin-top:1rem;padding-top:1rem}
.alert.error.card{background:#ffecec;border:1px solid #f5c2c7;color:#842029}
.alert.success.card{background:#e8f7ec;border:1px solid #a3cfbb;color:#0f5132}
/* Fieldset section styling */
fieldset{
  margin-top: 1.5rem;
  padding: 1rem 1.25rem 1.25rem;
  border-radius: 10px;
}

/* Legends: larger, bold, underlined */
fieldset > legend{
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: underline;
  padding: 0 .25rem;
}


/* Evidence uploader attribution */
.file-list .file-uploader {
  display: block;
  margin-top: .25rem;
}

/* Rider round amendments */
.round-amendment {
  margin-top: 1.5rem;
}

.round-amendment > summary {
  cursor: pointer;
  font-size: 1.1rem;
  list-style-position: outside;
  margin-left: 1.1rem;
}

.round-amendment-body {
  border-top: 1px solid color-mix(in srgb, var(--card-border-color, #ddd) 70%, transparent);
  margin-top: 1rem;
  padding-top: .25rem;
}

.amendment-round-card {
  padding: .4rem 0;
}

.amendment-claim-choice {
  display: inline-flex;
  font-weight: 700;
  margin: .6rem 0;
}

.amendment-claim-choice input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
}

.existing-claim-reason,
.amend-new-reason,
.amend-replacement {
  background: color-mix(in srgb, var(--card-bg, #fff) 92%, var(--card-border-color, #ddd));
  border: 1px solid color-mix(in srgb, var(--card-border-color, #ddd) 75%, transparent);
  border-radius: 8px;
  margin: .45rem 0 .7rem;
  padding: .75rem;
}

.amend-replacement select {
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  max-width: 620px;
  padding: 10px;
  width: 100%;
}

.amend-new-reason textarea,
.amend-replacement textarea {
  margin-bottom: 0;
}

.amend-replacement-reason {
  margin-top: .75rem;
}
