:root {
  --tes-primary: #2563eb; /* blue */
  --tes-primary-dark: #1e40af;
  --tes-bg: #ffffff;
  --tes-muted: #6b7280; /* gray-500 */
  --tes-border: #e5e7eb;
  --tes-surface: #f9fafb; /* neutral surface */
  --tes-success-bg: #ecfdf5;
  --tes-success-fg: #065f46;
}

.tes-wrapper {
  border: 1px solid var(--tes-border);
  padding: 20px;
  border-radius: 12px;
  background: var(--tes-bg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.tes-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.tes-tab {
  background: #f3f4f6;
  border: 1px solid var(--tes-border);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  color: #111827;
  transition: all .2s ease;
}
.tes-tab:hover {
  background: #eef2ff;
}
.tes-tab.active {
  background: var(--tes-primary);
  color: #fff;
  border-color: var(--tes-primary);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

.tes-steps .tes-step {
  display: none;
}
.tes-steps .tes-step.active {
  display: block;
}

.tes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.tes-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--tes-border);
  border-radius: 10px;
  background: var(--tes-bg);
}
.tes-input[readonly] {
  background: #f3f4f6;
}

.tes-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}
.tes-actions .button {
  border-radius: 10px !important;
  padding: 10px 16px !important;
  border: 1px solid var(--tes-border);
  background: #f8fafc;
}
.tes-actions .button:hover {
  background: #eef2ff;
}
.tes-actions .button-primary {
  background: var(--tes-primary) !important;
  color: #fff !important;
  border-color: var(--tes-primary) !important;
}
.tes-actions .button-primary:hover {
  background: var(--tes-primary-dark) !important;
}

.tes-summary {
  background: var(--tes-surface);
  border: 1px solid var(--tes-border);
  border-radius: 12px;
  padding: 16px;
}
.tes-summary h3 {
  margin-top: 0;
}
.tes-summary-list {
  margin: 0;
  padding: 0 0 0 18px;
}

.tes-message {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 8px;
}
.tes-message.updated {
  background: var(--tes-success-bg);
  color: var(--tes-success-fg);
}
.tes-message.error {
  background: #fef2f2;
  color: #991b1b;
}

.tes-info {
  padding: 12px 14px;
  border: 1px dashed var(--tes-border);
  border-radius: 10px;
  background: #f8fafc;
}
.tes-muted {
  color: var(--tes-muted);
  font-size: 13px;
}

/* Calendar styles with accessible, Traveler-friendly look */
.tes-calendar {
  border: 1px solid var(--tes-border);
  border-radius: 12px;
  padding: 10px;
  background: var(--tes-surface);
}
.tes-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.tes-cal-title {
  font-weight: 600;
}
.tes-cal-nav {
  border: 1px solid var(--tes-border);
  background: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
}
.tes-cal-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.tes-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
  color: var(--tes-muted);
  font-size: 12px;
}
.tes-cal-weekdays span {
  text-align: center;
}
.tes-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  min-height: calc((36px * 6) + (6px * 5)); /* 6 weeks baseline */
}
.tes-day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--tes-border);
  background: #fff;
  text-align: center;
  line-height: 1;
}
.tes-day.allowed {
  cursor: pointer;
}
.tes-day.allowed:hover {
  background: #eef2ff;
  border-color: var(--tes-primary);
}
.tes-day.selected {
  background: var(--tes-primary);
  color: #fff;
  border-color: var(--tes-primary);
}
.tes-day.blank,
.tes-day:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  border-style: dashed;
}

/* Responsive */
@media (max-width: 768px) {
  .tes-grid {
    grid-template-columns: 1fr;
  }
}
