/* Branding převzato z technis.kojetin.cz: červená #c9103e, font Open Sans, patička #252525 */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand-red: #c9103e;
  --brand-red-dark: #a30d33;
  --brand-red-light: #fef2f4;
  --footer-bg: #252525;
  --footer-bg-light: #303030;
  --text: #333;
  --text-muted: #666;
  --border: #e5e5e5;
  --bg: #f5f5f5;
  --bg-card: #ffffff;

  --status-free-bg: #e8f5ea;
  --status-free-text: #2d7d3a;
  --status-waiting-bg: #fff4d6;
  --status-waiting-text: #8a6a14;
  --status-busy-bg: #fde2e7;
  --status-busy-text: #a30d33;
}

body {
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
}

/* ---------- DEMO BANNER ---------- */
.demo-banner {
  background: #fff4d6;
  color: #8a6a14;
  padding: 8px 16px;
  text-align: center;
  font-size: 13px;
  border-bottom: 1px solid #e8d99c;
}

/* ---------- HLAVIČKA ---------- */
.site-header {
  background: #ffffff url("../img/header-banner.31577dc4e9ba.jpg") no-repeat right center;
  background-size: cover;
  border-bottom: 4px solid var(--brand-red);
}
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  min-height: 100px;
  flex-wrap: wrap;
}
.brand-logo {
  font-family: "Open Sans", Arial, sans-serif;
  font-weight: 800;
  font-size: 40px;
  color: var(--brand-red);
  letter-spacing: -1px;
  text-decoration: none;
  line-height: 1;
}
.brand-logo .brand-kojetin {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  display: block;
  margin-top: 2px;
  letter-spacing: 0;
}
.brand-tagline {
  margin-left: 20px;
  color: var(--text);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
}

/* ---------- NAVIGACE ---------- */
.site-nav {
  background: var(--footer-bg);
  border-bottom: 1px solid var(--footer-bg-light);
  overflow-x: auto;
}
.site-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
}
.site-nav a {
  color: white;
  text-decoration: none;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: background 0.1s ease;
}
.site-nav a:hover,
.site-nav a.active {
  background: var(--brand-red);
}

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  font-size: 13px;
}
.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.breadcrumb a {
  color: var(--brand-red);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--text-muted); margin: 0 6px; }
.breadcrumb .current { color: var(--text-muted); }

/* ---------- HLAVNÍ OBSAH ---------- */
.main {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 24px;
}
.page-title {
  color: var(--brand-red);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
}
.page-lead {
  color: var(--text);
  margin-bottom: 20px;
  font-size: 15px;
}

/* ---------- KARTA ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
  margin-bottom: 16px;
}
.card h3 {
  color: var(--brand-red);
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ---------- KALENDÁŘOVÝ LAYOUT ---------- */
.calendar-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}

.cabin-list-card { padding: 0; }
.cabin-list-card h3 {
  padding: 16px 20px 8px;
  margin: 0;
}
.cabin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 14px;
  transition: background 0.1s ease;
}
.cabin-item:last-child { border-bottom: none; }
.cabin-item:hover { background: #fafafa; }
.cabin-item.active {
  background: var(--brand-red-light);
  border-left: 3px solid var(--brand-red);
  padding-left: 17px;
  font-weight: 700;
}
.cabin-name { color: var(--text); }
.cabin-status {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.3px;
}
.status-free    { background: var(--status-free-bg);    color: var(--status-free-text); }
.status-partial { background: var(--status-waiting-bg); color: var(--status-waiting-text); }
.status-busy    { background: var(--status-busy-bg);    color: var(--status-busy-text); }

/* ---------- KALENDÁŘ (mřížka) ---------- */
.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.cal-title {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin-top: 4px;
}
.cal-nav {
  display: flex;
  gap: 6px;
}
.cal-nav button {
  background: #fff;
  border: 1px solid var(--border);
  padding: 6px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
}
.cal-nav button:hover { border-color: var(--brand-red); color: var(--brand-red); }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day-name {
  background: #fafafa;
  padding: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cal-day {
  background: #f8faf9;
  padding: 12px 6px 8px;
  min-height: 56px;
  text-align: center;
  border: 1px solid transparent;
  position: relative;
  font-size: 12px;
  text-decoration: none;
  display: block;
}
.cal-day .day-num {
  position: absolute;
  top: 3px;
  left: 5px;
  font-size: 11px;
  color: var(--text-muted);
}
.cal-day .day-label {
  display: block;
  margin-top: 14px;
  font-weight: 700;
}
.cal-day.empty { background: transparent; pointer-events: none; }
.cal-day.free {
  background: var(--status-free-bg);
  color: var(--status-free-text);
  cursor: pointer;
}
.cal-day.free:hover {
  background: #d3ebd8;
  border-color: var(--status-free-text);
  transform: scale(1.02);
}
.cal-day.waiting { background: var(--status-waiting-bg); color: var(--status-waiting-text); }
.cal-day.busy    { background: var(--status-busy-bg);    color: var(--status-busy-text); }
.cal-day.past    { background: #f0f0f0; color: #aaa; cursor: not-allowed; pointer-events: none; }

.cal-legend {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.cal-legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 14px; height: 14px; border-radius: 2px; }
.legend-free    { background: var(--status-free-bg); }
.legend-waiting { background: var(--status-waiting-bg); }
.legend-busy    { background: var(--status-busy-bg); }

/* ---------- FORMULÁŘ REZERVACE ---------- */
.reserve-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.reserve-grid fieldset {
  border: none;
  margin-bottom: 16px;
}
.reserve-grid legend {
  font-weight: 800;
  color: var(--brand-red);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.form-row { margin-bottom: 12px; }
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-field { display: block; }
.form-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
}
.form-input,
input.form-input,
input[type="text"].form-input,
input[type="email"].form-input,
input[type="tel"].form-input,
textarea.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: white;
}
.form-input:focus { outline: 2px solid var(--brand-red); outline-offset: -1px; }
.form-error {
  color: var(--brand-red);
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
  display: block;
}

.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* Summary panel */
.reserve-summary { position: sticky; top: 16px; align-self: start; }
.summary-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  font-size: 14px;
}
.summary-list dt { color: var(--text-muted); }
.summary-list dd { font-weight: 700; }
.summary-total {
  font-size: 18px !important;
  color: var(--brand-red);
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.summary-note {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- PLATEBNÍ STRÁNKA ---------- */
.payment-success {
  background: var(--status-free-bg);
  border: 1px solid var(--status-free-text);
  border-radius: 4px;
  padding: 16px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.success-badge {
  background: var(--status-free-text);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}

.payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.payment-data {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 14px;
}
.payment-data dt { color: var(--text-muted); }
.payment-data dd { font-weight: 700; }
.payment-amount {
  color: var(--brand-red);
  font-size: 22px !important;
}
.payment-warning {
  margin-top: 16px;
  background: var(--status-waiting-bg);
  color: var(--status-waiting-text);
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 13px;
  border-left: 3px solid var(--status-waiting-text);
}
.payment-qr { text-align: center; }
.qr-wrapper {
  display: inline-block;
  padding: 12px;
  background: white;
  border: 1px solid var(--border);
}
.qr-wrapper svg {
  width: 220px;
  height: 220px;
  display: block;
}
.qr-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ---------- TLAČÍTKA ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--brand-red);
  color: white;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s ease;
  border-radius: 0;
}
.btn:hover { background: var(--brand-red-dark); }
.btn-secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--brand-red);
  color: var(--brand-red);
  background: white;
}

/* ---------- EMPTY STATE ---------- */
.empty {
  color: var(--text-muted);
  padding: 24px;
  text-align: center;
  background: #fafafa;
  border-radius: 4px;
}
.empty a {
  color: var(--brand-red);
  text-decoration: none;
  font-weight: 700;
}
.empty a:hover { text-decoration: underline; }

/* ---------- PATIČKA ---------- */
.site-footer {
  background: var(--footer-bg);
  color: #aaa;
  margin-top: 48px;
  padding: 32px 24px;
}
.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}
.site-footer h4 {
  color: white;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}
.site-footer a { color: #ccc; text-decoration: none; }
.site-footer a:hover { color: var(--brand-red); }
.site-footer p { font-size: 13px; margin-bottom: 4px; }


/* ============================================================
   MOBILNÍ ZOBRAZENÍ (do 900px)
   ============================================================ */

@media (max-width: 900px) {
  .calendar-layout { grid-template-columns: 1fr; }
  .reserve-grid { grid-template-columns: 1fr; }
  .reserve-summary { position: static; }
  .payment-grid { grid-template-columns: 1fr; }

  /* Cabin list jako horizontální chips */
  .cabin-list-card { padding: 0; }
  .cabin-list-card > h3 {
    padding: 12px 16px 6px;
    font-size: 13px;
  }
  .cabin-list-card .cabin-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 12px;
    margin: 0 4px 4px 0;
    background: white;
    gap: 4px;
  }
  .cabin-list-card {
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 16px 16px;
  }
  .cabin-item.active {
    border-color: var(--brand-red);
    border-left: 1px solid var(--brand-red);
    padding-left: 12px;
  }
  .cabin-status { font-size: 10px; padding: 1px 5px; }
}

@media (max-width: 768px) {
  body { font-size: 14px; }
  .main { padding: 0 12px; margin: 16px auto; }

  .site-header-inner {
    padding: 12px 16px;
    min-height: 80px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .brand-logo { font-size: 32px; }
  .brand-logo .brand-kojetin { font-size: 12px; }
  .brand-tagline { margin-left: 0; font-size: 11px; }

  .site-nav-inner { padding: 0 12px; }
  .site-nav a { padding: 12px 14px; font-size: 12px; }

  .breadcrumb { padding: 8px 12px; font-size: 12px; }

  .page-title { font-size: 22px; }
  .page-lead { font-size: 14px; }

  .card { padding: 16px; }

  /* Calendar grid: smaller days */
  .cal-day {
    min-height: 44px;
    padding: 14px 4px 6px;
    font-size: 10px;
  }
  .cal-day .day-num { top: 2px; left: 3px; font-size: 10px; }
  .cal-day .day-label { display: none; }
  /* Show only color, day number stays */
  .cal-day-name { padding: 6px 4px; font-size: 10px; }

  .cal-header { flex-direction: row; justify-content: space-between; }
  .cal-title { font-size: 16px; }
  .cal-nav button { padding: 6px 10px; font-size: 12px; }

  .cal-legend { font-size: 12px; gap: 12px; }

  /* Forms */
  .form-row-2 { grid-template-columns: 1fr; gap: 0; }
  .form-actions {
    flex-direction: column-reverse;
    gap: 8px;
  }
  .form-actions .btn { width: 100%; text-align: center; }

  /* Payment */
  .payment-success { flex-direction: row; padding: 12px 16px; }
  .success-badge { width: 32px; height: 32px; font-size: 18px; }
  .qr-wrapper svg { width: 180px; height: 180px; }
  .payment-amount { font-size: 18px !important; }

  /* Footer */
  .site-footer { padding: 24px 16px; }
  .site-footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 420px) {
  .brand-logo { font-size: 28px; }
  .cal-day { min-height: 38px; }
  .demo-banner { font-size: 12px; padding: 6px 12px; }
}
