/* Místnost 393 – Booking Form */
:root {
  --m393-primary:   #9b2335;
  --m393-secondary: #f5f0eb;
  --m393-text:      #333;
  --m393-bg:        #fff;
  --m393-radius:    8px;
  --m393-shadow:    0 2px 12px rgba(0,0,0,.08);
}

.m393-wrap {
  max-width: 720px;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  color: var(--m393-text);
  position: relative;
}

.m393-title {
  color: var(--m393-primary);
  margin-bottom: 1.4rem;
}

/* Steps */
.m393-step {
  background: var(--m393-bg);
  border-radius: var(--m393-radius);
  box-shadow: var(--m393-shadow);
  padding: 28px 32px;
  margin-bottom: 20px;
}

.m393-step h3 {
  color: var(--m393-primary);
  margin-top: 0;
  font-size: 1.15rem;
}

.m393-hint { font-size: .9rem; color: #666; margin-top: -6px; }

.m393-hidden { display: none !important; }

/* Fields */
.m393-field { margin-bottom: 16px; }
.m393-field label { display: block; font-weight: 700; margin-bottom: 5px; font-size: .9rem; }
.m393-field input,
.m393-field select,
.m393-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #ccc;
  border-radius: 6px;
  font-size: .95rem;
  transition: border-color .2s;
  box-sizing: border-box;
  background: var(--m393-bg);
  color: var(--m393-text);
}
.m393-field input:focus,
.m393-field select:focus,
.m393-field textarea:focus { outline: none; border-color: var(--m393-primary); }

.m393-field-row { display: flex; gap: 16px; }
.m393-field-row .m393-field { flex: 1; }

.req { color: var(--m393-primary); }

/* Buttons */
.m393-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: 6px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: background .2s, transform .1s;
}
.m393-btn:active { transform: scale(.98); }
.m393-btn-next,
.m393-btn-submit {
  background: var(--m393-primary);
  color: #fff !important;
}
.m393-btn-next:hover,
.m393-btn-submit:hover { background: color-mix(in srgb, var(--m393-primary) 85%, #000); }
.m393-btn-back {
  background: var(--m393-secondary);
  color: var(--m393-text) !important;
}
.m393-nav { display: flex; gap: 12px; margin-top: 20px; }

/* Packages grid */
.m393-packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.m393-pkg-card {
  border: 2px solid #ddd;
  border-radius: var(--m393-radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
  background: var(--m393-bg);
  position: relative;
}
.m393-pkg-card:hover { border-color: var(--m393-primary); box-shadow: 0 2px 8px rgba(155,35,53,.15); }
.m393-pkg-card.selected { border-color: var(--m393-primary); background: color-mix(in srgb, var(--m393-primary) 5%, var(--m393-bg)); }

.m393-pkg-name { font-weight: 700; margin-bottom: 6px; }
.m393-pkg-price { font-size: 1.3rem; color: var(--m393-primary); font-weight: 700; }
.m393-pkg-price-orig { font-size: .8rem; text-decoration: line-through; color: #888; }
.m393-pkg-duration { font-size: .82rem; color: #666; margin-top: 4px; }
.m393-pkg-persons { font-size: .82rem; color: #666; }
.m393-pkg-badge-regular {
  position: absolute; top: 8px; right: 8px;
  background: #d1fae5; color: #065f46;
  font-size: .7rem; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
}

/* Calendar */
.m393-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.m393-cal-nav button {
  background: none; border: none; font-size: 1.4rem;
  cursor: pointer; color: var(--m393-primary); padding: 4px 10px;
}
.m393-cal-nav span { font-weight: 700; font-size: 1rem; }

.m393-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 14px;
}
.m393-cal-day-name { text-align: center; font-size: .78rem; font-weight: 700; color: #666; padding: 4px 0; }
.m393-cal-day {
  text-align: center;
  padding: 8px 4px;
  border-radius: 6px;
  cursor: pointer;
  font-size: .88rem;
  transition: background .15s;
  border: 1.5px solid transparent;
}
.m393-cal-day:hover:not(.disabled):not(.empty) { background: var(--m393-secondary); }
.m393-cal-day.today        { font-weight: 700; border-color: var(--m393-primary); }
.m393-cal-day.available    { background: #dcfce7; color: #166534; }
.m393-cal-day.available:hover { background: #bbf7d0; }
.m393-cal-day.partial-booking { background: #ffedd5 !important; color: #9a3412 !important; }
.m393-cal-day.partial-booking:hover { background: #fed7aa !important; }
.m393-cal-day.selected     { background: var(--m393-primary) !important; color: #fff !important; border-color: var(--m393-primary); }
.m393-cal-day.disabled     { color: #d1d5db; cursor: not-allowed; background: #f9fafb; }
.m393-cal-day.has-booking  { background: #fee2e2; color: #b91c1c; cursor: not-allowed;
                              position: relative; }
.m393-cal-day.has-booking::after { content: '●'; font-size: 6px; position: absolute;
                              bottom: 2px; left: 50%; transform: translateX(-50%);
                              color: #b91c1c; }
.m393-cal-day.empty        { cursor: default; }

/* Calendar legend */
.m393-cal-legend {
  display: flex; gap: 16px; margin: 4px 0 14px; flex-wrap: wrap;
}
.m393-legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600;
}
.m393-legend-item::before {
  content: ''; display: inline-block;
  width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0;
}
.m393-legend-item.available::before    { background: #dcfce7; border: 1.5px solid #86efac; }
.m393-legend-item.available            { color: #166534; }
.m393-legend-item.partial-booking::before { background: #ffedd5; border: 1.5px solid #fdba74; }
.m393-legend-item.partial-booking      { color: #9a3412; }
.m393-legend-item.has-booking::before  { background: #fee2e2; border: 1.5px solid #fca5a5; }
.m393-legend-item.has-booking          { color: #b91c1c; }
.m393-legend-item.disabled::before     { background: #f3f4f6; border: 1.5px solid #d1d5db; }
.m393-legend-item.disabled             { color: #9ca3af; }
#m393-time-picker-wrap { margin-top: 12px; }
#m393-time-picker-wrap label { font-weight: 700; margin-bottom: 6px; display: block; }
#m393-time-picker { padding: 8px 12px; border-radius: 6px; border: 1.5px solid #ccc; font-size: .95rem; }
.m393-duration-info { font-size: .85rem; color: #666; margin-top: 6px; }

/* Summary */
.m393-summary {
  background: var(--m393-secondary);
  border-radius: var(--m393-radius);
  padding: 18px 22px;
  margin-bottom: 18px;
}
.m393-summary table { width: 100%; border-collapse: collapse; }
.m393-summary th { text-align: left; color: var(--m393-primary); font-size: .85rem; width: 40%; padding: 6px 4px; }
.m393-summary td { font-size: .9rem; padding: 6px 4px; border-bottom: 1px solid rgba(0,0,0,.07); }

/* Badges */
.m393-badge-regular {
  background: #d1fae5; color: #065f46;
  border-radius: 6px; padding: 8px 14px;
  font-weight: 700; margin-bottom: 12px;
  font-size: .9rem;
}

/* Steps indicator */
.m393-steps-indicator {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 8px;
}
.m393-step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #ddd;
  color: #666;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 700;
  transition: background .2s, color .2s;
}
.m393-step-dot.active { background: var(--m393-primary); color: #fff; }
.m393-step-dot.done   { background: #d1fae5; color: #065f46; }

/* Turnstile */
.m393-turnstile { margin-bottom: 16px; }

/* Loading */
.m393-loading { text-align: center; padding: 20px; color: #888; font-style: italic; }
.m393-spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2.5px solid rgba(255,255,255,.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: m393-spin .7s linear infinite;
}
@keyframes m393-spin { to { transform: rotate(360deg); } }

/* Error */
.m393-error { background: #fee2e2; color: #991b1b; border-radius: 6px; padding: 12px 16px; margin-top: 10px; font-size: .9rem; }

/* Success */
.m393-success { text-align: center; padding: 20px 0; }
.m393-success-icon { font-size: 3rem; margin-bottom: 12px; }
.m393-success h3 { color: var(--m393-primary); }
.m393-success-ref { font-size: .95rem; margin-top: 12px; }

/* Responsive */
@media (max-width: 480px) {
  .m393-step { padding: 18px 14px; }
  .m393-field-row { flex-direction: column; }
  .m393-packages-grid { grid-template-columns: 1fr 1fr; }
}
