/* MINIROGO pieteikšanās – publiskās lapas (Bootstrap 3 vidē).
   Vizuālā valoda: orientēšanās karte – KP apļi (zīmola sarkanais), KP karodziņš (oranžs/balts),
   Rīgas siluets hero fonā. Kustība tikai ar nolūku; prefers-reduced-motion ievērots apakšā. */
:root {
  --mr-red: #8e1f22;          /* banera sarkanais – distance, akcenti */
  --mr-red-soft: #f6e9e9;
  --mr-ink: #2a2b2d;
  --mr-gray: #434446;         /* banera antracīts */
  --mr-muted: #6b6e72;
  --mr-line: #d9d6d0;
  --mr-paper: #fbfaf6;        /* kartes papīrs */
  --mr-flag: #f36f21;         /* KP karodziņš */
  --mr-contour: #b27b43;
  --mr-ok: #1e9e5a;
  --mr-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --mr-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- Pogas: nospiediena atgriezeniskā saite ---------- */
.btn, .mr-btn { transition: transform 160ms var(--mr-ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.btn:active, .mr-btn:active { transform: scale(0.97); }
.btn-theme { background: var(--mr-gray); border-color: var(--mr-gray); }
@media (hover: hover) and (pointer: fine) { .btn-theme:hover { background: var(--mr-red); border-color: var(--mr-red); } }
/* skins/green.css a:link pārkrāso pogu tekstu */
a.btn.btn-theme, a.btn.btn-theme:link, a.btn.btn-theme:visited, a.btn.btn-theme:hover { color: #fff; }
a.btn.btn-default, a.btn.btn-default:link, a.btn.btn-default:visited { color: #333; }

.mr-btn, a.mr-btn:link, a.mr-btn:visited { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px;
  border: 2px solid var(--mr-gray); border-radius: 999px; background: #fff; color: var(--mr-ink); font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; font-size: 14px; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.mr-btn-primary, a.mr-btn-primary:link, a.mr-btn-primary:visited { background: var(--mr-red); border-color: var(--mr-red); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  a.mr-btn:hover { border-color: var(--mr-red); color: var(--mr-red); text-decoration: none; }
  a.mr-btn-primary:hover { background: #a3262a; border-color: #a3262a; color: #fff; }
}

/* ---------- Pirmā lapa ---------- */
.mr-home { margin: 4px 0 10px; }
.mr-hero { position: relative; padding: 26px 26px 132px; margin: 0 -15px 22px; overflow: hidden; border-radius: 4px;
  background: var(--mr-paper) url(../img/riga-skyline.svg?v5) center bottom / 100% auto no-repeat; border: 1px solid #ece7dc; }
.mr-eyebrow { margin: 0 0 6px; color: var(--mr-red); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.mr-hero-title { margin: 0 0 10px; color: var(--mr-ink); font-size: 46px; line-height: 1; font-weight: 800; letter-spacing: -.01em; }
.mr-hero-title span { color: var(--mr-muted); font-weight: 300; }
.mr-hero-lead { max-width: 34em; margin: 0 0 18px; color: #45474a; font-size: 16px; line-height: 1.55; }
.mr-next, a.mr-next:link, a.mr-next:visited { display: flex; align-items: center; gap: 14px; max-width: 440px; margin: 0 0 18px; padding: 12px 16px;
  background: #fff; border: 1px solid #e6e1d6; border-left: 4px solid var(--mr-flag); border-radius: 6px; color: var(--mr-ink); text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.05); transition: transform 160ms var(--mr-ease-out), box-shadow 200ms ease; }
.mr-next:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { a.mr-next:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); text-decoration: none; } }
.mr-next-no { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 3px solid var(--mr-red); border-radius: 50%;
  color: var(--mr-red); font-weight: 800; font-size: 18px; background: #fff; }
.mr-next-text { display: flex; flex-direction: column; line-height: 1.3; }
.mr-next-text small { color: var(--mr-muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.mr-next-text b { font-size: 17px; }
.mr-next-text span { color: var(--mr-red); font-size: 13px; font-weight: 600; }
.mr-next-done { color: var(--mr-muted); }
.mr-hero-actions { display: flex; flex-wrap: wrap; gap: 8px 10px; }


/* Formāta kartītes */
.mr-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 6px; }
.mr-fact > * { min-width: 0; }
.mr-fact { display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: start; padding: 12px 14px; background: rgba(255,255,255,.85);
  border: 1px solid #ebe7df; border-radius: 6px; }
.mr-fact svg { grid-row: span 2; width: 30px; height: 30px; fill: none; stroke: var(--mr-red); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mr-fact b { color: var(--mr-ink); font-size: 14px; }
.mr-fact span { color: var(--mr-muted); font-size: 13px; line-height: 1.4; }

@media (max-width: 767px) {
  .mr-hero { padding: 20px 16px 96px; margin: 0 -15px 18px; background-size: 150% auto; background-position: 58% bottom; }
  .mr-hero-title { font-size: 34px; }
  .mr-hero-lead { font-size: 15px; }
  .mr-hero-actions .mr-btn { flex: 1 1 auto; }
  .mr-facts { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Pieteikuma forma ---------- */
.mr-form .form-control { margin-bottom: 8px; }
.mr-form .form-control:focus { border-color: var(--mr-gray); box-shadow: 0 0 0 3px rgba(67,68,70,.12); }
.mr-form { counter-reset: mr-step; }
.mr-box { border: 1px solid #e3dfd6; border-radius: 6px; padding: 12px 14px 10px; margin: 0 0 14px; background: rgba(255,255,255,.75); }
/* virsraksts bloka iekšpusē (nevis uz rāmja līnijas): float + 100% izņem legend no fieldset rāmja */
.mr-box > legend { float: left; display: flex; align-items: center; gap: 8px; width: 100%; border: 0; font-size: 13px; font-weight: 700;
  letter-spacing: .06em; line-height: 22px; padding: 0; margin: 0 0 10px; color: var(--mr-ink); }
.mr-box > legend + * { clear: both; }
.mr-box > legend .mr-remove { margin-left: auto; }
/* sadaļu numuri kā KP apļi */
.mr-form > .mr-box:not([style*="display: none"]) > legend::before, .mr-form > .mr-box:not([style*="display:none"]) > legend::before {
  counter-increment: mr-step; content: counter(mr-step); flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; box-sizing: border-box; border: 2px solid var(--mr-red); border-radius: 50%; color: var(--mr-red);
  font-size: 12px; line-height: 1; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.mr-hint { color: var(--mr-muted); font-size: 12px; margin: 2px 0 6px; }
.mr-mailwarn { margin: 4px 0 6px; padding: 7px 10px; border-left: 3px solid var(--mr-flag); border-radius: 4px; background: #fff6ec; color: var(--mr-ink); font-size: 12px; line-height: 1.45;
  transition: background-color 200ms ease, border-color 200ms ease; }
.mr-mailwarn.is-on { border-left-color: var(--mr-red); background: var(--mr-red-soft); }
.mr-mailwarn.is-on b { color: var(--mr-red); }
.mr-err { color: #c62828; font-size: 13px; margin: -4px 0 8px; }
.mr-form .is-invalid, .mr-form .is-invalid:focus { border-color: #c62828; box-shadow: 0 0 0 3px rgba(198,40,40,.15); }
.mr-stages.is-invalid { outline: 2px solid #c62828; outline-offset: 3px; border-radius: 6px; }
.mr-agree.is-invalid { color: #c62828; }

.mr-stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 6px 0; }
.mr-stage { position: relative; display: block; margin: 0; padding: 8px 8px 8px 30px; border: 2px solid #ddd8ce; border-radius: 6px;
  background: #fff; cursor: pointer; font-weight: normal; line-height: 1.3; -webkit-tap-highlight-color: transparent;
  transition: border-color 150ms ease, background-color 150ms ease, transform 160ms var(--mr-ease-out); }
/* KP karodziņš stūrī – parādās, kad kārta izvēlēta */
.mr-stage::after { content: ""; position: absolute; top: 7px; right: 7px; width: 14px; height: 14px; border: 1px solid #d9581a; border-radius: 1px;
  background: linear-gradient(135deg, #fff 0 50%, var(--mr-flag) 50% 100%); opacity: 0; transform: scale(0.8);
  transition: opacity 150ms ease, transform 200ms var(--mr-ease-out); }
.mr-stage:has(input:checked)::after { opacity: 1; transform: scale(1); }
.mr-stage input { position: absolute; left: 9px; top: 11px; margin: 0; accent-color: var(--mr-red); }
.mr-stage:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .mr-stage:hover { border-color: #b8a9a0; } }
.mr-stage:has(input:checked) { border-color: var(--mr-red); background: var(--mr-red-soft); }
.mr-stage.locked { opacity: .95; }
.mr-stage.closed { opacity: .45; cursor: not-allowed; background: #f3f3f3; transform: none; }
.mr-stage-no { display: block; font-weight: 700; }
.mr-stage-date { display: block; font-size: 13px; }
.mr-stage-place { display: block; font-size: 12px; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-stage-closed { display: block; font-size: 11px; color: #c62828; }
.mr-sub { display: block; font-weight: normal; padding: 9px 12px; margin: 6px 0 8px; background: #fff6ec; border: 1px solid #f5c9a6; border-radius: 6px; cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease; }
.mr-sub:has(input:checked) { background: #ffe9d6; border-color: var(--mr-flag); }
.mr-sub input { accent-color: var(--mr-flag); }
.mr-sub .mr-hint { display: block; margin: 2px 0 0 18px; }

.mr-types { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 4px 0; }
.mr-type { font-weight: normal; cursor: pointer; margin: 0; }
.mr-type input, .mr-agree input { accent-color: var(--mr-red); }
.mr-member legend .mr-remove { padding: 0 7px; line-height: 18px; }
.mr-odb .btn { width: 100%; margin-bottom: 8px; }
.mr-add-wrap { margin: -4px 0 14px; }
.mr-summary { padding: 10px 14px; margin: 0 0 12px; background: var(--mr-paper); border: 1px solid #e3dccb; border-left: 4px solid var(--mr-red); border-radius: 6px; min-height: 22px; }
.mr-agree { display: block; font-weight: normal; padding: 10px 12px; margin: 0 0 12px; background: #f6f5f1; border-radius: 6px; cursor: pointer; }
.mr-agree input { margin-right: 6px; }
.mr-check th { width: 32%; font-weight: 600; }
.mr-total th { border-top: 2px solid #999 !important; font-size: 15px; }
#mrForm > .text-center .btn { min-height: 46px; font-weight: 700; letter-spacing: .05em; }

/* Labošana: jau pieteiktās kārtas */
.mr-stage.mr-fixed, .mr-stage.mr-fixed:has(input:checked) { border-color: var(--mr-ok); background: #eaf7ef; cursor: default; transform: none; }
.mr-stage-fixed { display: block; font-size: 11px; color: var(--mr-ok); font-weight: 600; }

/* ---------- 2. solis – logs virs formas ---------- */
.mr-modal .modal-content { border: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.mr-modal .modal-header { background: var(--mr-gray); color: #fff; border-bottom: 3px solid var(--mr-red); }
.mr-modal .modal-header .close { color: #fff; opacity: .8; text-shadow: none; }
.mr-modal .modal-title, .mr-modal .modal-title .fa { color: #fff; font-weight: 700; font-size: 16px; margin: 0; }
.mr-modal .modal-body { background: #fafafa; }
/* parādīšanās no centra (modāls – nav piesaistīts pogai), ātra ease-out */
.mr-modal.fade .modal-dialog { opacity: 0; transform: scale(0.96); transition: transform 220ms var(--mr-ease-out), opacity 180ms ease-out; }
.mr-modal.fade.in .modal-dialog { opacity: 1; transform: scale(1); }
@media (max-width: 767px) { .mr-modal .modal-dialog { margin: 6px; } .mr-modal .table { font-size: 12px; } }

/* ---------- Saraksts, sānjosla, nolikums ---------- */
.mr-tabs { margin-bottom: 10px; }
.mr-tabs > li > a { padding: 8px 10px; }
/* aktīvās cilnes svītra – iekšēja ēna (neietekmē izmēru; Bootstrap :hover pārraksta border, tāpēc border te nederētu) */
.mr-tabs > li.active > a, .mr-tabs > li.active > a:hover, .mr-tabs > li.active > a:focus { box-shadow: inset 0 3px 0 var(--mr-red); }
.mr-groups { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 10px; }
.mr-teams .mr-sub-row td { border-top: 0 !important; padding-top: 0; }
.mr-teams img { vertical-align: -1px; }
.mr-side td { padding: 5px !important; font-size: 13px; vertical-align: middle !important; }
.mr-side td:first-child b { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 2px solid var(--mr-red); border-radius: 50%;
  color: var(--mr-red); font-size: 11px; }
.mr-side .mr-past { opacity: .5; }

/* ---------- Nolikums ---------- */
.mr-rules { margin: 4px 0 16px; color: #3a3c3f; font-size: 15px; line-height: 1.6; }
.mr-rules-head { padding: 24px 26px 18px; margin: 0 -15px 18px; border: 1px solid #ece7dc; border-radius: 4px; background: var(--mr-paper); }
.mr-rules-title { margin: 0 0 14px; color: var(--mr-ink); font-size: 36px; line-height: 1.05; font-weight: 800; }
.mr-rules-title span { display: block; margin-top: 4px; color: var(--mr-muted); font-size: 20px; font-weight: 300; }
.mr-rules-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.mr-rules-meta div { padding-left: 10px; border-left: 3px solid var(--mr-red); }
.mr-rules-meta dt { color: var(--mr-muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.mr-rules-meta dd { margin: 0; font-size: 14px; line-height: 1.4; color: var(--mr-ink); }
.mr-rules-nav { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 14px; border-top: 1px dashed #ddd4c2; }
.mr-rules-nav a, .mr-rules-nav a:link, .mr-rules-nav a:visited { padding: 4px 12px; border: 1px solid #ddd4c2; border-radius: 999px; background: #fff; color: var(--mr-ink);
  font-size: 13px; text-decoration: none; transition: border-color 150ms ease, color 150ms ease, transform 160ms var(--mr-ease-out); }
.mr-rules-nav a:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .mr-rules-nav a:hover { border-color: var(--mr-red); color: var(--mr-red); } }

.mr-rules-sec { padding: 4px 0 6px; margin: 0 0 14px; scroll-margin-top: 16px; }
.mr-rules-sec + .mr-rules-sec { padding-top: 16px; border-top: 1px solid #e7e2d8; }
/* sadaļas virsraksts ar KP karodziņu */
.mr-rules-sec h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--mr-ink); font-size: 19px; font-weight: 700; }
.mr-rules-sec h3::before { content: ""; flex: none; width: 14px; height: 14px; border: 1px solid #d9581a; border-radius: 1px;
  background: linear-gradient(135deg, #fff 0 50%, var(--mr-flag) 50% 100%); }
.mr-rules-sec h4 { margin: 14px 0 4px; color: var(--mr-ink); font-size: 15px; font-weight: 700; }
.mr-rules-sec p { margin: 0 0 10px; }

.mr-rules-stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 0; margin: 0 0 10px; list-style: none; }
.mr-rules-stages li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid #e6e1d6; border-radius: 6px; background: rgba(255,255,255,.85); line-height: 1.3; }
.mr-rules-stages li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.mr-rules-stages small { color: var(--mr-muted); font-size: 12px; }
.mr-rules-stages em { align-self: flex-start; margin-top: 2px; padding: 0 6px; border-radius: 3px; background: var(--mr-flag); color: #fff; font-style: normal;
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mr-rules-no { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; box-sizing: border-box;
  border: 3px solid var(--mr-red); border-radius: 50%; color: var(--mr-red); font-weight: 800; font-size: 15px; line-height: 1; }
.mr-rules-stages .is-next .mr-rules-no, .mr-rules-stages .is-live .mr-rules-no { background: var(--mr-red); color: #fff; }
.mr-rules-stages .is-past { opacity: .5; }

.mr-rules-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0; margin: 0 0 10px; list-style: none; }
.mr-rules-groups li { display: flex; flex-direction: column; padding: 9px 12px; border: 1px solid #e6e1d6; border-radius: 6px; background: rgba(255,255,255,.85); line-height: 1.4; }
.mr-rules-groups li b { color: var(--mr-ink); }
.mr-rules-groups li span { color: var(--mr-muted); font-size: 13px; }
.mr-rules-groups .is-wide { grid-column: 1 / -1; }
.mr-rules-groups .is-accent { border-left: 4px solid var(--mr-flag); }

.mr-rules-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.mr-rules-cols h4 { margin-top: 0; }
.mr-rules-app { display: flex; align-items: center; gap: 20px; margin-top: 16px; padding: 14px 16px; border: 1px solid #e3dccb; border-left: 4px solid var(--mr-flag); border-radius: 6px; background: var(--mr-paper); }
.mr-rules-app-text { flex: 1 1 auto; min-width: 0; }
.mr-rules-app-text h4 { margin-top: 0; }
.mr-rules-app-text p:last-child { margin-bottom: 0; }
.mr-rules-app-text a { word-break: break-word; }
.mr-rules-app-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.mr-rules-app-btns small { margin-left: 5px; opacity: .7; font-weight: 400; letter-spacing: 0; text-transform: none; }
.mr-rules-app-qr { flex: none; padding: 8px; border: 1px solid #e6e1d6; border-radius: 6px; background: #fff; line-height: 0; }
.mr-rules-app-qr img { display: block; width: 150px; height: 150px; image-rendering: pixelated; }

.mr-rules-prices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.mr-rules-prices div { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border: 1px solid #e6e1d6; border-radius: 6px; background: #fff; text-align: center; }
.mr-rules-prices span { color: var(--mr-ink); font-size: 26px; font-weight: 800; line-height: 1.1; }
.mr-rules-prices small { margin-top: 4px; color: var(--mr-muted); font-size: 12px; line-height: 1.35; }
.mr-rules-prices .is-sub { border-color: #f5c9a6; background: #fff6ec; }
.mr-rules-prices .is-sub span { color: var(--mr-red); }
.mr-rules-bank { padding: 12px 16px; border: 1px solid #e3dccb; border-left: 4px solid var(--mr-red); border-radius: 6px; background: var(--mr-paper); }
.mr-rules-bank p { margin: 0 0 6px; }
.mr-rules-bank dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 16px; margin: 0; }
.mr-rules-bank dt { color: var(--mr-muted); font-weight: 600; }
.mr-rules-bank dd { margin: 0; color: var(--mr-ink); word-break: break-word; }
.mr-rules-note { padding: 10px 14px; border-radius: 6px; background: var(--mr-red-soft); color: var(--mr-ink); }
.mr-rules-cta { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }

@media (max-width: 767px) {
  .mr-rules { font-size: 14px; }
  .mr-rules-head { padding: 20px 16px 14px; }
  .mr-rules-title { font-size: 28px; }
  .mr-rules-title span { font-size: 17px; }
  .mr-rules-meta, .mr-rules-groups, .mr-rules-cols { grid-template-columns: minmax(0, 1fr); }
  .mr-rules-prices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mr-rules-prices .is-sub { grid-column: span 3; flex-direction: row; justify-content: center; gap: 12px; }
  .mr-rules-prices .is-sub small br { display: none; }
  .mr-rules-cta .mr-btn { flex: 1 1 auto; }
  .mr-rules-app { flex-direction: column; align-items: stretch; }
  .mr-rules-app-qr { align-self: center; }
}
@media (max-width: 767px) { .mr-stages { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Mazāk kustības ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn:active, .mr-btn:active, .mr-stage:active, .mr-next:active { transform: none; }
  .mr-modal.fade .modal-dialog { transform: none; transition: opacity 150ms ease; }
}
