/* Elegant Hall Calendar v2.0 — Refined luminous theme */
.ehc-scope {
  --ehc-primary: #3b83a4;
  --ehc-primary-soft: #dbeafe;
  --ehc-primary-dark: #3b83a4;
  --ehc-surface: #ffffff;
  --ehc-panel: #f8fafc;
  --ehc-bg: linear-gradient(135deg, #eef2ff 0%, #fdf2f8 100%);
  --ehc-text: #0f172a;
  --ehc-muted: #64748b;
  --ehc-border: #e2e8f0;
  --ehc-shadow: 0 25px 45px -20px rgba(15, 23, 42, 0.35);
  --ehc-radius: 18px;
  --ehc-free: #10b981;
  --ehc-partial: #f97316;
  --ehc-booked: #ef4444;
}

.ehc-wrap,
.ehc-front {
  font-family: "Inter", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  color: var(--ehc-text);
  position: relative;
  overflow: hidden;
}

.ehc-wrap {
  margin-top: 24px;
}

.ehc-admin-shell {
  background: var(--ehc-bg);
  padding: 32px;
  border-radius: var(--ehc-radius);
  box-shadow: var(--ehc-shadow);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ehc-card {
  background: var(--ehc-surface);
  border: 1px solid var(--ehc-border);
  border-radius: var(--ehc-radius);
  padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ehc-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ehc-text);
}

.ehc-view-card {
  padding: 20px;
}

.ehc-view-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.ehc-view-label {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ehc-muted);
}

.ehc-view-btn {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  text-decoration: none;
  color: var(--ehc-muted);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.85);
  transition: all 0.2s ease;
}

.ehc-view-btn:hover {
  color: var(--ehc-primary-dark);
  border-color: rgba(37, 99, 235, 0.4);
}

.ehc-view-btn.is-active {
  background: var(--ehc-primary);
  border-color: var(--ehc-primary-dark);
  color: #fff;
  box-shadow: 0 14px 26px -18px rgba(37, 99, 235, 0.65);
}

.ehc-note {
  color: var(--ehc-muted);
  margin: 0;
}

.ehc-card-form .submit {
  margin-top: 12px;
}

.ehc-settings-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.ehc-card .form-table {
  margin: 0;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 16px;
}

.ehc-card .form-table th {
  padding: 0 0 12px;
  width: 220px;
  color: var(--ehc-muted);
  font-weight: 600;
}

.ehc-card .form-table td {
  padding: 0;
}

.ehc-card textarea,
.ehc-card input[type="time"],
.ehc-card input[type="number"] {
  border-radius: 10px;
  border: 1px solid var(--ehc-border);
  background: var(--ehc-panel);
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color 0.2s ease;
}

.ehc-card textarea:focus,
.ehc-card input[type="time"]:focus,
.ehc-card input[type="number"]:focus {
  outline: none;
  border-color: var(--ehc-primary);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.ehc-card textarea {
  font-family: inherit;
  min-height: 140px;
}

.ehc-radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.ehc-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--ehc-text);
}

.ehc-hours-table {
  border-radius: var(--ehc-radius);
  overflow: hidden;
}

.ehc-hours-table thead th {
  background: rgba(248, 250, 252, 0.7);
  color: var(--ehc-muted);
  font-weight: 700;
}

.ehc-hours-table tbody tr:nth-child(even) {
  background: rgba(241, 245, 249, 0.6);
}

.ehc-hours-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.08);
}

.ehc-hours-table td,
.ehc-hours-table th {
  border-color: var(--ehc-border);
  padding: 14px 16px;
}

.ehc-hours-table input[type="time"],
.ehc-hours-table input[type="number"] {
  width: 100%;
}

.ehc-wrap .notice {
  border-radius: 14px;
  box-shadow: 0 14px 30px -24px rgba(15, 23, 42, 0.45);
}

.ehc-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

/* Tabs */
.ehc-tabs {
  display: flex;
  gap: 12px;
  margin: 20px 0 26px;
  flex-wrap: wrap;
}

.ehc-tab {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(59, 131, 164, 0.20);
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--ehc-muted);
  font-weight: 600;
  transition: all 0.2s ease;
  backdrop-filter: blur(6px);
}

.ehc-tab:hover {
  color: #fff;
  border-color: rgba(59, 131, 164, 0.35);
  background: rgba(59, 131, 164, 1);
}

.ehc-tab--active {
  color: #fff;
  background: var(--ehc-primary);
  border-color: var(--ehc-primary-dark);
  box-shadow: 0 12px 25px -12px rgba(37, 99, 235, 0.65);
}

/* Toolbar */
.ehc-toolbar {
  position: sticky;
  top: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--ehc-border);
  padding: 14px 16px;
  backdrop-filter: blur(8px);
  margin-bottom: 10px;
}

.ehc-nav {
  text-decoration: none;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--ehc-border);
  font-size: 22px;
  color: var(--ehc-primary-dark);
  transition: all 0.2s ease;
  background: var(--ehc-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ehc-nav:hover {
  background: var(--ehc-primary);
  color: #fff;
  box-shadow: 0 12px 20px -12px rgba(37, 99, 235, 0.8);
}

.ehc-range {
  font-weight: 500;
  color: var(--ehc-text);
  font-size: 18px;
}

.ehc-spacer {
  flex: 1;
}

.ehc-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ehc-tools label {
  font-weight: 600;
  color: var(--ehc-muted);
}

.ehc-tools .button,
.ehc-tools input[type="time"] {
  border-radius: 10px;
  border: 1px solid var(--ehc-border);
  background: var(--ehc-panel);
  padding: 8px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: all 0.2s ease;
}

.ehc-tools .button:hover {
  border-color: var(--ehc-primary);
  color: var(--ehc-primary-dark);
  box-shadow: 0 14px 24px -18px rgba(37, 99, 235, 0.6);
}

.ehc-divider {
  width: 1px;
  height: 28px;
  background: var(--ehc-border);
  display: inline-block;
  margin: 0 6px;
}

/* Carded wrappers */
.ehc-table-wrap,
.ehc-month-wrap {
  overflow: auto;
  background: var(--ehc-surface);
}

/* Week table */
.ehc-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px;
}

.ehc-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--ehc-panel);
  border-bottom: 1px solid var(--ehc-border);
  padding: 12px 10px;
  text-align: center;
  font-weight: 800;
  color: var(--ehc-text);
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.2);
  vertical-align: middle !important;
}

.ehc-time-col {
  left: 0;
  position: sticky;
  z-index: 4;
  text-align: left;
  min-width: 170px;
  background: var(--ehc-panel);
  border-right: 1px solid var(--ehc-border);
}

.ehc-th-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.ehc-day {
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--ehc-text);
  text-transform: uppercase;
  font-weight: 600;
}

.ehc-date {
  font-size: 14px;
  font-weight: 500;
  color: var(--ehc-text);
}

.ehc-day-col.is-today .ehc-day,
.ehc-day-col.is-today .ehc-date {
  color: var(--ehc-primary-dark);
  text-decoration: none;
}

.ehc-day-col.is-today::after {
  content: "Danas";
  display: inline-flex;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ehc-primary-soft);
  color: var(--ehc-primary-dark);
  font-size: 11px;
  font-weight: 700;
}

.ehc-col-bulk .button {
  margin: 6px 2px 0;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--ehc-border);
  background: var(--ehc-panel);
  font-weight: 600;
  transition: all 0.2s ease;
}

.ehc-col-bulk .button:hover {
  background: var(--ehc-primary);
  color: #fff;
}

.ehc-table tbody th.ehc-time-cell {
  left: 0;
  position: sticky;
  z-index: 2;
  background: var(--ehc-panel);
  border-right: 1px solid var(--ehc-border);
  font-weight: 700;
  padding: 10px 12px;
  color: var(--ehc-muted);
}

.ehc-table tbody tr:nth-child(even) th.ehc-time-cell {
  background: rgba(241, 245, 249, 0.6);
}

.ehc-table tbody tr:nth-child(odd) {
  background: rgba(248, 250, 252, 0.35);
}

.ehc-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.06);
}

.ehc-table td {
  padding: 10px 8px;
  text-align: center;
}
.ehc-table td:hover {
  padding: 10px 8px;
  text-align: center;
}

.ehc-table td:last-child {
  
}

.ehc-cell .ehc-slot {
  display: block;
  padding: 12px 10px;
  border-radius: 12px;
  font-weight: 500;
  background: rgba(148, 163, 184, 0.12);
  color: var(--ehc-muted);
  transition: all 0.2s ease;
}

.ehc-free {
  background: var(--ehc-free) !important;
  color: #fff !important;
}

.ehc-booked {
  background: var(--ehc-booked) !important;
  color: #fff !important;
}

.ehc-partial {
  background: var(--ehc-partial) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px -18px rgba(249, 115, 22, 0.65);
}

.ehc-slot input.ehc-chk {
  display: none;
}

/* Legend */
.ehc-legend {
  color: var(--ehc-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.ehc-toolbar .ehc-legend {
  margin-left: auto;
}

.ehc-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  vertical-align: middle;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

/* Month grid */
.ehc-month {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}

.ehc-month thead th {
  position: sticky;
  top: 0;
  background: var(--ehc-panel);
  border-bottom: 1px solid var(--ehc-border);
  padding: 12px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ehc-muted);
  text-align: center;
}

.ehc-month td {
  width: 14.285%;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--ehc-border);
  border-right: 1px solid rgba(226, 232, 240, 0.5);
  background: rgba(248, 250, 252, 0.45);
}

.ehc-month td:last-child {
  border-right: none;
}

.ehc-mcell {
  color: var(--ehc-muted);
  border-radius: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ehc-mcell.in-month {
  color: var(--ehc-text);
}

.ehc-mcell:hover {
  background: rgba(37, 99, 235, 0.08);
}

.ehc-mcell.is-today {
  border: 1px solid rgba(37, 99, 235, 0.4);
  box-shadow: 0 12px 24px -20px rgba(37, 99, 235, 0.45);
}

.ehc-mday {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 15px;
}

.ehc-mstatus {
  display: inline-flex;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 0;
  color: #fff;
  gap: 6px;
  align-items: center;
  box-shadow: 0 12px 24px -18px rgba(15, 23, 42, 0.35);
}

.ehc-mcell.ehc-state-free {
  background: rgba(16, 185, 129, 0.2);
}

.ehc-mcell.ehc-state-booked {
  background: rgba(239, 68, 68, 0.2);
}

.ehc-mcell.ehc-state-partial {
  background: rgba(254, 249, 195, 0.65);
}
.ehc-mcell--interactive {
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
.ehc-mcell--interactive:hover {
  transform: translateY(-2px);
}

/* Admin month selectable boxes */
.ehc-month-admin td {
  padding: 6px;
  background: transparent;
}

.ehc-month-admin .ehc-mcell {
  background: transparent;
  box-shadow: none;
  padding: 10px 15px 10px 10px;
}

.ehc-month-admin .ehc-mbox {
  display: block;
  width: 100%;
  height: 100%;
  padding: 12px 10px;
  border-radius: 12px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.12);
  color: var(--ehc-muted);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

/* Month popup */
.ehc-month-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ehc-month-popup.is-open {
  display: flex;
}

.ehc-month-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.ehc-month-popup__box {
  position: relative;
  background: var(--ehc-surface);
  border-radius: var(--ehc-radius);
  padding: 28px;
  box-shadow: var(--ehc-shadow);
  width: min(90vw, 420px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: white;
}

.ehc-month-popup__close {
  position: absolute;
  top: 15px;
  right: 10px;
  background: none;
  border: none;
  font-size: 30px;
  color: #3b83a4;
  cursor: pointer;
  line-height: 1;
}

.ehc-month-popup__close:hover,
.ehc-month-popup__close:focus {
  background-color: white;
  color: #336f8a; /* darker tone on hover */
  border: none;
}

.ehc-month-popup__close:active {
  color: #265e76; /* slightly deeper tone for click */
  border: none;
}


.ehc-month-popup__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--ehc-text);
  padding-right: 28px;
}

.ehc-month-popup__body {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 6px;
}

.ehc-month-popup__status {
  display: none;
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--ehc-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
}

.ehc-month-popup__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ehc-month-popup__item {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--ehc-text);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.ehc-month-popup-open {
  overflow: hidden;
}


.ehc-month-admin .ehc-mbox .ehc-mday {
  display: block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.ehc-month-admin .ehc-mbox .ehc-mstatus {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: currentColor;
  opacity: 0.9;
}

.ehc-month-admin .ehc-mbox:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -18px rgba(15, 23, 42, 0.25);
}

.ehc-month-admin .ehc-mbox.ehc-free {
  background: var(--ehc-free) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px -18px rgba(16, 185, 129, 0.7);
}

.ehc-month-admin .ehc-mbox.ehc-booked {
  background: var(--ehc-booked) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px -18px rgba(239, 68, 68, 0.65);
}

.ehc-month-admin .ehc-mbox.ehc-partial {
  background: var(--ehc-partial) !important;
  color: #fff !important;
  box-shadow: 0 12px 24px -18px rgba(249, 115, 22, 0.65);
}

.ehc-month-admin .ehc-mcell-admin:not(.in-month) {
  opacity: 0.45;
}

.ehc-mday.muted {
  color: var(--ehc-muted);
  font-weight: 600;
}

.ehc-mday.muted {
  color: var(--ehc-muted);
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .ehc-toolbar,
  .ehc-toolbar .ehc-legend {
    justify-content: center !important;
    text-align: center !important;
    margin-inline: auto !important;
  }
	
  .ehc-wrap,
  .ehc-front {
    padding: 24px;
  }

  .ehc-admin-shell {
    padding: 24px;
  }

  .ehc-card {
    padding: 20px;
  }

  .ehc-toolbar {
    position: static;
    flex-wrap: wrap;
  }

  .ehc-range {
    font-size: 16px;
  }

  .ehc-table,
  .ehc-month {

  }
}

@media (max-width: 640px) {
  .ehc-toolbar,
  .ehc-toolbar .ehc-legend {
    justify-content: center !important;
    text-align: center !important;
    margin-inline: auto !important;
  }
	
  .ehc-tabs {
    justify-content: center;
  }

  .ehc-card .form-table th,
  .ehc-card .form-table td {
    width: 100%;
  }

  .ehc-cell .ehc-slot {
    width: 100%;
  }
	
  .ehc-card .form-table th {
    margin-bottom: 6px;
  }

  .ehc-tools {
    width: 100%;
    justify-content: space-between;
  }

  .ehc-tools .button,
  .ehc-tools input[type="time"] {
    flex: 1 1 45%;
  }
}
/* Never wrap time labels (green/red pills) */
.ehc-slot,
.ehc-slot * {
  white-space: nowrap !important;
}

/* Center pills in the cell and let them size to content */
.ehc-cell {
  text-align: center;
}
.ehc-cell .ehc-slot {
  display: inline-flex;               /* keeps it on one line */
  align-items: center;
  justify-content: center;
  width: auto !important;             /* override the mobile 100% width */
  max-width: 100%;                    /* safety inside narrow cells */
  padding: 8px 14px;                  /* adjust to your taste */
  text-overflow: clip;                /* (or 'ellipsis' if you prefer) */
}

/* Optional: minimum pill width so all look consistent */
.ehc-cell .ehc-slot { min-width: 120px; } /* tweak if needed */

/* If your text is inside a <p>, keep it inline */
.ehc-slot p { display: inline; }
