.integra-tymeslot {
  --it-border: #d7dde5;
  --it-text: #1f2933;
  --it-muted: #52606d;
  --it-accent: #0f766e;
  --it-surface: #f8fafc;
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  color: var(--it-text);
  font-family: inherit;
}

.integra-tymeslot__controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.integra-tymeslot__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.integra-tymeslot__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--it-muted);
}

.integra-tymeslot__select {
  appearance: none;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem 2.25rem 0.65rem 0.9rem;
  border: 1px solid var(--it-border);
  border-radius: 0.5rem;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, var(--it-muted) 50%),
    linear-gradient(135deg, var(--it-muted) 50%, transparent 50%);
  background-position: calc(100% - 1.1rem) calc(50% - 0.15rem),
    calc(100% - 0.75rem) calc(50% - 0.15rem);
  background-size: 0.35rem 0.35rem, 0.35rem 0.35rem;
  background-repeat: no-repeat;
  color: var(--it-text);
  font-size: 1rem;
  line-height: 1.3;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.integra-tymeslot__select:focus {
  outline: none;
  border-color: var(--it-accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.integra-tymeslot__select:disabled {
  background-color: var(--it-surface);
  color: var(--it-muted);
  cursor: not-allowed;
}

.integra-tymeslot__hint {
  margin: 0 0 1rem;
  color: #9b1c1c;
  font-size: 0.925rem;
}

.integra-tymeslot__embed[hidden] {
  display: none !important;
}

.integra-tymeslot__iframe-wrap {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  min-height: 640px !important;
  height: 640px;
  border: 1px solid var(--it-border);
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--it-surface);
}

.integra-tymeslot__iframe-wrap iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.integra-tymeslot__loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--it-muted);
  font-size: 0.95rem;
  background: var(--it-surface);
  z-index: 1;
}

.integra-tymeslot__iframe-wrap.is-loaded .integra-tymeslot__loader {
  display: none;
}

.integra-tymeslot__modes {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  padding: 0.25rem;
  border: 1px solid var(--it-border);
  border-radius: 0.65rem;
  background: var(--it-surface);
}

.integra-tymeslot__mode {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--it-muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.integra-tymeslot__mode:hover,
.integra-tymeslot__mode:focus {
  color: var(--it-text);
  text-decoration: none;
}

.integra-tymeslot__mode.is-active {
  background: #fff;
  color: var(--it-text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.integra-tymeslot[data-mode="combined"] .integra-tymeslot__field--staff {
  display: none;
}

.integra-tymeslot[data-mode="combined"] .integra-tymeslot__controls {
  grid-template-columns: 1fr;
}

.integra-tymeslot__combined {
  margin-bottom: 1.25rem;
}

.integra-tymeslot__calendar {
  border: 1px solid var(--it-border);
  border-radius: 0.75rem;
  padding: 1rem;
  background: #fff;
}

.integra-tymeslot__cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.integra-tymeslot__cal-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.integra-tymeslot__cal-nav-btn {
  appearance: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--it-border);
  border-radius: 0.45rem;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  color: var(--it-text);
}

.integra-tymeslot__cal-heading,
.integra-tymeslot__staff-pick-heading {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--it-muted);
}

.integra-tymeslot__cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.integra-tymeslot__cal-dow {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--it-muted);
  padding: 0.25rem 0;
}

.integra-tymeslot__cal-day {
  appearance: none;
  border: 0;
  background: transparent;
  min-height: 2.4rem;
  border-radius: 0.45rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--it-muted);
  cursor: default;
}

.integra-tymeslot__cal-day.is-outside {
  opacity: 0.4;
}

.integra-tymeslot__cal-day.is-available {
  background: rgba(15, 118, 110, 0.1);
  color: var(--it-text);
  font-weight: 600;
  cursor: pointer;
}

.integra-tymeslot__cal-day.is-available:hover {
  background: rgba(15, 118, 110, 0.18);
}

.integra-tymeslot__cal-day.is-selected {
  background: var(--it-accent);
  color: #fff;
}

.integra-tymeslot__cal-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1px var(--it-accent);
}

.integra-tymeslot__cal-day:disabled {
  cursor: default;
}

.integra-tymeslot__cal-status {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  color: var(--it-muted);
}

.integra-tymeslot__cal-status.is-error {
  color: #9b1c1c;
}

.integra-tymeslot__staff-pick {
  margin-top: 1rem;
}

.integra-tymeslot__staff-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.integra-tymeslot__staff-btn {
  appearance: none;
  border: 1px solid var(--it-border);
  background: #fff;
  color: var(--it-text);
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
}

.integra-tymeslot__staff-btn:hover {
  border-color: var(--it-accent);
}

.integra-tymeslot__staff-btn.is-active {
  background: var(--it-accent);
  border-color: var(--it-accent);
  color: #fff;
}

.integra-tymeslot__time-pick {
  margin-top: 1rem;
}

.integra-tymeslot__time-pick-heading {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--it-muted);
}

.integra-tymeslot__time-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.integra-tymeslot__time-btn {
  appearance: none;
  border: 1px solid var(--it-border);
  background: #fff;
  color: var(--it-text);
  font: inherit;
  font-weight: 600;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  min-width: 6.5rem;
}

.integra-tymeslot__time-btn:hover {
  border-color: var(--it-accent);
}

.integra-tymeslot__time-btn.is-active {
  background: var(--it-accent);
  border-color: var(--it-accent);
  color: #fff;
}

@media (max-width: 640px) {
  .integra-tymeslot__controls {
    grid-template-columns: 1fr;
  }

  .integra-tymeslot__iframe-wrap {
    min-height: 520px;
    height: 520px;
  }

  .integra-tymeslot__modes {
    width: 100%;
  }

  .integra-tymeslot__mode {
    flex: 1;
  }
}
