/* ==========================================================================
   Components shared by the public site and the administration.
   ========================================================================== */

/* --- Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.25rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.1s,
    box-shadow 0.15s;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: linear-gradient(180deg, var(--c-amber-400), var(--c-amber-500));
  color: var(--c-ink-900);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: linear-gradient(180deg, var(--c-amber-300), var(--c-amber-400));
  color: var(--c-ink-900);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  border-color: var(--c-line-strong);
  background: transparent;
  color: var(--c-ink-700);
}

.btn--ghost:hover {
  background: var(--c-cream-100);
  border-color: var(--c-amber-500);
  color: var(--c-ink-900);
}

.btn--ghost-light {
  border-color: rgb(255 255 255 / 35%);
  background: transparent;
  color: var(--c-cream-50);
}

.btn--ghost-light:hover {
  background: rgb(255 255 255 / 10%);
  border-color: var(--c-amber-300);
  color: #fff;
}

.btn--danger {
  background: var(--c-brick-500);
  color: #fff;
}

.btn--danger:hover {
  background: var(--c-brick-700);
  color: #fff;
}

.btn--danger-ghost {
  color: var(--c-brick-500);
  background: transparent;
}

.btn--danger-ghost:hover {
  background: var(--c-brick-100);
  color: var(--c-brick-700);
}

.btn--sm {
  min-height: 2.25rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.9375rem;
}

.btn--lg {
  min-height: 3.25rem;
  padding: 0.8rem 1.6rem;
  font-size: 1.0625rem;
}

.btn--icon {
  min-width: 2.75rem;
  padding-inline: 0.6rem;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.55;
  pointer-events: none;
}

/* --- Forms ---------------------------------------------------------------------- */
.form {
  display: block;
}

.field {
  margin-bottom: 1.1rem;
}

.field__label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.field__optional {
  font-weight: 400;
  color: var(--c-text-muted);
}

.field__hint {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--c-text-muted);
}

.field__hint--block {
  margin-bottom: 1.25rem;
}

.field__error {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c-brick-500);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--c-line-strong);
  border-radius: var(--radius-md);
  background: #fff;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.textarea {
  resize: vertical;
  line-height: 1.5;
}

.select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b5a4b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1.1rem;
}

.input--sm,
.select--sm {
  min-height: 2.25rem;
  padding-block: 0.3rem;
}

.input:hover,
.textarea:hover,
.select:hover {
  border-color: var(--c-amber-600);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--c-amber-500);
  box-shadow: 0 0 0 3px rgb(212 145 42 / 28%);
}

.has-error .input,
.has-error .textarea,
.has-error .select {
  border-color: var(--c-brick-500);
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
}

.checkbox input {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.2rem 0 0;
  accent-color: var(--c-amber-600);
}

.form-grid {
  display: grid;
  gap: 0 1rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.form-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.form__legal {
  font-size: 0.875rem;
  color: var(--c-text-muted);
}

/* On/off switch built from a checkbox */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch__track {
  position: relative;
  flex: none;
  width: 2.9rem;
  height: 1.65rem;
  border-radius: 999px;
  background: var(--c-line-strong);
  transition: background-color 0.2s;
}

.switch__track::after {
  content: '';
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.switch input:checked + .switch__track {
  background: var(--c-hop-500);
}

.switch input:checked + .switch__track::after {
  transform: translateX(1.25rem);
}

.switch input:focus-visible + .switch__track {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
}

.switch__label {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.switch__label small {
  color: var(--c-text-muted);
}

/* --- Alerts and notices ------------------------------------------------------------ */
.alert,
.flash {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--c-line-strong);
  border-left-width: 4px;
  border-radius: var(--radius-md);
  background: #fff;
}

.alert p,
.flash p {
  margin: 0;
}

.alert .icon,
.flash .icon {
  margin-top: 0.15rem;
}

.alert--error,
.flash--error {
  border-color: var(--c-brick-500);
  background: var(--c-brick-100);
  color: var(--c-brick-700);
}

.alert--warning,
.flash--warning {
  border-color: var(--c-amber-500);
  background: #fbefd2;
  color: #5e3e07;
}

.alert--info,
.flash--info {
  border-color: var(--c-sky-700);
  background: var(--c-sky-100);
  color: #1f3f57;
}

.flash--success,
.alert--success {
  border-color: var(--c-hop-500);
  background: var(--c-hop-100);
  color: var(--c-hop-700);
}

.notice {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-line-strong);
  background: #fff;
  font-size: 0.975rem;
}

.notice__title {
  margin: 0 0 0.4rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.notice ul {
  margin: 0;
  padding-left: 1.1rem;
}

.notice--warning {
  border-color: var(--c-amber-500);
  background: #fbefd2;
  color: #5e3e07;
}

.notice--light {
  border-color: rgb(255 255 255 / 25%);
  background: rgb(255 255 255 / 8%);
  color: var(--c-text-on-dark);
}

/* --- Badges, tags, chips ------------------------------------------------------------- */
.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--c-cream-200);
  color: var(--c-ink-700);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.badge--success {
  background: var(--c-hop-100);
  color: var(--c-hop-700);
}

.badge--warning {
  background: #fbe4b0;
  color: #6b4508;
}

.badge--danger {
  background: var(--c-brick-100);
  color: var(--c-brick-700);
}

.badge--info {
  background: var(--c-sky-100);
  color: var(--c-sky-700);
}

.tag {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  white-space: nowrap;
}

.tag--public {
  background: var(--c-hop-100);
  color: var(--c-hop-700);
}

.tag--private {
  background: var(--c-plum-100);
  color: var(--c-plum-700);
}

.tag--closed {
  background: var(--c-brick-100);
  color: var(--c-brick-700);
}

.tag--hours {
  background: var(--c-sky-100);
  color: var(--c-sky-700);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.chip {
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--c-line-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 0.9375rem;
}

/* --- Panels and cards ------------------------------------------------------------------ */
.panel {
  margin-bottom: 1.5rem;
  padding: clamp(1.15rem, 3vw, 1.75rem);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  background: var(--c-paper);
  box-shadow: var(--shadow-sm);
}

.panel > :last-child {
  margin-bottom: 0;
}

.panel h2 {
  font-size: var(--step-2);
}

.panel--plain {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.panel--accent {
  border-left: 5px solid var(--c-amber-500);
}

.panel--danger {
  border-color: var(--c-brick-400);
  background: #fff8f6;
}

.panel--center {
  text-align: center;
}

.panel--narrow {
  max-width: 34rem;
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.panel__head h2 {
  margin: 0;
}

.panel__actions {
  margin-top: 1.25rem;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  background: var(--c-paper);
  box-shadow: var(--shadow-sm);
}

/* --- Tables ------------------------------------------------------------------------------ */
.table-wrap {
  overflow-x: auto;
}

.table {
  font-size: 0.975rem;
}

.table th {
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--c-line);
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

.table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--c-line);
  vertical-align: top;
}

.table tbody tr:hover {
  background: rgb(245 238 220 / 45%);
}

.table__actions {
  text-align: right;
  white-space: nowrap;
}

.table__actions form {
  display: inline-block;
  margin: 0;
}

.table__actions .btn {
  vertical-align: middle;
}

.table td[data-label='Čas'] {
  white-space: nowrap;
}

@media (max-width: 47.99rem) {
  .table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .table--stack,
  .table--stack tbody,
  .table--stack tr,
  .table--stack td {
    display: block;
  }

  .table--stack tr {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--c-line-strong);
  }

  .table--stack td {
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.3rem 0.25rem;
    border: 0;
    text-align: right;
  }

  .table--stack td::before {
    content: attr(data-label);
    flex: none;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    text-align: left;
  }

  .table--stack td.table__actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    white-space: normal;
  }

  .table--stack td.table__actions::before {
    display: none;
  }
}

/* --- Dialog ------------------------------------------------------------------------------- */
.dialog {
  width: min(100% - 2rem, 34rem);
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--c-paper);
  color: var(--c-text);
  box-shadow: var(--shadow-lg);
}

.dialog::backdrop {
  background: rgb(20 14 10 / 62%);
  backdrop-filter: blur(3px);
}

.dialog h2 {
  font-size: var(--step-2);
}

.dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

/* --- Misc ----------------------------------------------------------------------------------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.toolbar--center {
  justify-content: center;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}

.plain-list {
  list-style: none;
}

.plain-list li {
  padding: 0.35rem 0;
}

.plain-list--rows li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  border-bottom: 1px solid var(--c-line);
}

.plain-list--rows li:last-child {
  border-bottom: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.85rem;
  border: 1.5px solid rgb(255 255 255 / 30%);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--c-cream-50);
  font-weight: 600;
}

/* --- Brand mark (inline SVG, colours via CSS) ----------------------------------- */
.brand__mark-bg {
  fill: var(--c-ink-800);
  stroke: rgb(229 169 61 / 55%);
  stroke-width: 1.5;
}

.brand__mark-handle {
  fill: none;
  stroke: var(--c-amber-400);
  stroke-width: 3.5;
  stroke-linecap: round;
}

.brand__mark-beer {
  fill: var(--c-amber-400);
}

.brand__mark-shine {
  fill: none;
  stroke: rgb(255 255 255 / 45%);
  stroke-width: 2.2;
  stroke-linecap: round;
}

.brand__mark-foam {
  fill: var(--c-cream-50);
}

/* --- Next week's menu (collapsed under the current one) ------------------------------------ */

.menu-next {
  margin-top: 2.5rem;
  border: 1px solid var(--c-line);
  border-radius: 0.75rem;
  padding: 0 1rem 1rem;
}

.menu-next__summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 0;
  font-weight: 600;
  cursor: pointer;
}

.menu-next[open] > .menu-next__summary {
  margin-bottom: 0.75rem;
}

@media print {
  .menu-next:not([open]) {
    display: none;
  }
}