﻿
:root {
  --bg: #f5f4ef;
  --card: #fffefa;
  --text: #272b25;
  --muted: #74786f;
  --line: #dddcd4;
  --green: #65745f;
  --green-dark: #4e5b49;
  --red: #9a6b61;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
}

header {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  background: rgba(245,244,239,.96);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 18px;
  font-weight: 700;
}

.logo span { color: var(--green); }

nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}

nav a:hover { color: var(--green-dark); }

main { padding: 48px 0 70px; }

.intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 42px;
  align-items: center;
  margin-bottom: 42px;
}

.intro h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -.04em;
}

.intro p {
  margin: 0;
  color: var(--muted);
  max-width: 430px;
}

.intro-image {
  height: 250px;
  overflow: hidden;
  border-radius: var(--radius);
}

.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 600;
}

.schedule {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(39, 43, 37, .05);
}

.day {
  border-bottom: 1px solid var(--line);
}

.day:last-child { border-bottom: 0; }

.day-head {
  padding: 9px 14px;
  background: #efeee8;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.day-name {
  font-size: 14px;
  font-weight: 700;
}

.day-date {
  color: var(--muted);
  font-size: 12px;
}

.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.slot {
  min-height: 68px;
  padding: 9px 12px;
  margin: 5px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-items: center;
}

.slot:last-child { border-right: 1px solid var(--line); }

.slot-time {
  grid-row: 1 / 3;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.slot-price {
  color: var(--muted);
  font-size: 11px;
}

.slot.free {
  background: #edf4e9;
  border-color: #b9cbb3;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.slot.free:hover {
  background: #e3eedf;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(78,91,73,.12);
}

.slot.free .status {
  color: #4e6a49;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.slot.busy {
  background: #f5e9e6;
  border-color: #dfc4be;
}

.slot.busy .status {
  color: #9a6157;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.slot.busy .status {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.slot.busy .status::after {
  content: "rezervováno";
  color: #9a8580;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.slot.busy .slot-price {
  color: #88817d;
}

.slot.busy .status::after {
  content: "";
}

.status {
  font-size: 11px;
}

.free-link {
  display: grid;
  position: relative;
}

.free-link::after {
  content: "→";
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  font-size: 15px;
  font-weight: 700;
}

.note {
  margin: 12px 0 12px 0;
  color: var(--muted);
  font-size: 12px;
}

.reserve-cta {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 9px;
  background: #e8eee4;
  color: var(--green-dark);
  font-size: 12px;
  text-align: center;
  border: 1px solid #d2ddce;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  border: 0;
  font-weight: 600;
  cursor: pointer;
}

.button:hover { background: var(--green-dark); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

.rules {
  margin: 0;
  padding-left: 22px;
}

.rules li {
  margin-bottom: 15px;
  padding-left: 4px;
}

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.contact p { color: var(--muted); }

.contact a {
  color: var(--green-dark);
  font-weight: 600;
}

.form {
  max-width: 620px;
}

.form-row {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
}

input, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.summary {
  padding: 15px 17px;
  margin-bottom: 22px;
  background: #eef1eb;
  border-radius: 10px;
}

.back {
  display: inline-block;
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 14px;
}

footer {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 700px) {
  .intro, .contact {
    grid-template-columns: 1fr;
  }

  .intro-image { height: 210px; }

  .slots {
    grid-template-columns: 1fr;
  }

  .slot {
    min-height: 58px;
    display: grid;
    grid-template-columns: 52px 1fr auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 7px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .slot:last-child { border-bottom: 0; }

  .slot-time {
    grid-row: auto;
  }

  .slot-price { order: 2; }
  .status { order: 3; text-align: right; }
  .free-link::after { display: none; }
}


/* Stavy termínů */
.slot.free {
  background: #edf4e9;
  border-color: #b9cbb3;
}

.slot.reserved {
  background: #f5efe3;
  border-color: #d9c49c;
}

.slot.paid {
  background: #e7efe8;
  border-color: #a8c3ae;
}

.slot.free .status {
  color: #4e6a49;
}

.slot.reserved .status {
  color: #8b6a31;
}

.slot.paid .status {
  color: #4d7057;
}

.slot.reserved .status::after {
  content: "zarezervováno, čeká na platbu";
  display: block;
  color: #a18a62;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.slot.paid .status::after {
  content: "uhrazeno";
  display: block;
  color: #75927c;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.slot.free .status::after {
  content: "kliknutím rezervujete";
  display: block;
  color: #779072;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  border: 1px solid var(--line);
}

.legend-dot.free { background: #edf4e9; border-color: #b9cbb3; }
.legend-dot.reserved { background: #f5efe3; border-color: #d9c49c; }
.legend-dot.paid { background: #e7efe8; border-color: #a8c3ae; }

.payment-box {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f6f1;
}

.payment-box h2 {
  margin: 0 0 14px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  letter-spacing: -.02em;
  font-weight: 700;
}

.payment-grid {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 22px;
  align-items: center;
}

.payment-details {
  margin: 0;
  padding: 0;
  list-style: none;
}

.payment-details li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.payment-details li:last-child { border-bottom: 0; }

.payment-details strong {
  display: inline-block;
  min-width: 125px;
}

.qr {
  width: 160px;
  height: 160px;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.example-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}

.success-message {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 10px;
  background: #edf4e9;
  border: 1px solid #b9cbb3;
  color: #4e6a49;
}

@media (max-width: 700px) {
  .payment-grid {
    grid-template-columns: 1fr;
  }

  .qr {
    width: 145px;
    height: 145px;
  }
}


/* Výrazné barevné rozlišení stavů */
.slot.free {
  background: #dff0d8;
  border: 2px solid #9fbd96;
  color: #30472d;
}

.slot.free:hover {
  background: #d3e9ca;
  border-color: #75966c;
  box-shadow: 0 5px 14px rgba(75, 103, 68, .16);
}

.slot.reserved,
.slot.paid {
  background: #f2ede3;
  border: 2px solid #d8c9aa;
}

.slot.reserved .status,
.slot.paid .status {
  color: #796746;
}

.slot.reserved .status::after {
  content: "zarezervováno, čeká na platbu";
  display: block;
  color: #a18e6b;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.slot.paid {
  background: #ebe7dd;
  border-color: #cfc6b2;
}

.slot.paid .status::after {
  content: "zaplaceno";
  display: block;
  color: #8c826d;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.slot.free .status::after {
  content: "kliknutím rezervujete";
  display: block;
  color: #587750;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.legend-dot.free {
  background: #dff0d8;
  border-color: #9fbd96;
}

.legend-dot.reserved,
.legend-dot.paid {
  background: #f2ede3;
  border-color: #d8c9aa;
}

.legend-dot.paid {
  background: #ebe7dd;
  border-color: #cfc6b2;
}

/* Rezervační formulář */
.reservation-form {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.reservation-form h2 {
  margin: 0 0 15px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
}

/* Seznam termínů */

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.admin-header h1 {
  margin: 0 0 5px;
  font-size: 32px;
  font-weight: 500;
}

.admin-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.term-table {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(39, 43, 37, .05);
}

.term-table table {
  width: 100%;
  border-collapse: collapse;
}

.term-table th {
  padding: 11px 12px;
  background: #efeee8;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.term-table td {
  padding: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  vertical-align: middle;
}

.term-table tr:hover {
  background: #faf9f5;
}

.term-table .muted {
  color: var(--muted);
  font-size: 12px;
}

/* Status */

.table-status {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.free-status {
  color: #4e6a49;
  background: #dff0d8;
  border: 1px solid #9fbd96;
}

.reserved-status {
  color: #796746;
  background: #f2ede3;
  border: 1px solid #d8c9aa;
}

.paid-status {
  color: #4d7057;
  background: #e7efe8;
  border: 1px solid #a8c3ae;
}

.actions {
  white-space: nowrap;
}

.actions a {
  color: var(--green-dark);
  font-size: 12px;
}

.actions a:hover {
  text-decoration: underline;
}

.actions .delete-link {
  color: var(--red);
}


/* Mobile */

@media (max-width: 900px) {
  .term-table {
    overflow-x: auto;
  }

  .term-table table {
    min-width: 950px;
  }
}

@media (max-width: 700px) {
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .admin-header .button {
    width: 100%;
  }
}

/* =========================================
   FORMS
   ========================================= */

.form-card {
  max-width: 620px;
  margin: 0 auto;
}

.form-card h1 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.03em;
}

.form-intro {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 14px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 25px;
}

.form-actions .back {
  margin: 0;
}

.form-button-danger {
  background: var(--red);
}

.form-button-danger:hover {
  background: #80564e;
}


/* Confirmation / details */

.form-details {
  margin: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.form-detail {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
}

.form-detail + .form-detail {
  border-top: 1px solid var(--line);
}

.form-detail-label {
  color: var(--muted);
  font-size: 13px;
}

.form-detail-value {
  font-size: 14px;
  font-weight: 600;
}


/* Warning / information */

.form-message {
  padding: 12px 14px;
  margin: 20px 0;

  border-radius: 9px;

  background: #f5efe3;
  border: 1px solid #d8c9aa;

  color: #796746;
  font-size: 12px;
}

/* Mobile */

@media (max-width: 600px) {

  .form-card {
    padding: 22px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .form-actions .button {
    width: 100%;
  }

  .form-actions .back {
    text-align: center;
  }

  .form-detail {
    flex-direction: column;
    gap: 3px;
  }
}

.form-select {
  width: 100%;
  min-height: 46px;
  padding: 0 40px 0 14px;

  border: 1px solid var(--line);
  border-radius: 9px;

  background-color: white;
  color: var(--text);

  font: inherit;
  font-size: 14px;

  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(101, 116, 95, .12);
}

.card > h1 {
  margin: 0 0 16px;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -.03em;
}

.card > section {
  margin-top: 34px;
}

.card h2 {
  margin-top: 0;
}

.card h3 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 600;
}

.card p {
  margin: 0 0 16px;
}

.card a {
  color: var(--green-dark);
  font-weight: 600;
}

.card a:hover {
  text-decoration: underline;
}
.text-danger {
  display: block;
  margin-top: 6px;
  color: var(--red);
  font-size: 12px;
  line-height: 1.4;
}

/* Chybový stav inputu */
.input-validation-error {
  border-color: var(--red) !important;
  background: #fff9f7;
}

.input-validation-error:focus {
  outline: none;
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px rgba(154, 107, 97, .12);
}

/* Úspěšný / normální focus */
input:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(101, 116, 95, .12);
}

/* Souhrn chyb nahoře */
.validation-summary-errors {
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid #d8b8b0;
  border-radius: 9px;
  background: #fbefec;
  color: var(--red);
  font-size: 13px;
}

.validation-summary-errors ul {
  margin: 0;
  padding-left: 18px;
}

.validation-summary-errors li {
  margin: 3px 0;
}

/* Když je souhrn prázdný, nezabírá místo */
.validation-summary-valid {
  display: none;
}

/* Informace k rezervaci */
.reservation-info {
  margin: 0 0 22px;
  padding: 14px 16px;
  background: #f2f2ec;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.reservation-info p {
  margin: 0;
}

.reservation-info p + p {
  margin-top: 8px;
}

.reservation-info strong {
  color: var(--green-dark);
  font-weight: 600;
}
