.tb-widget {
  border: 1px solid #ccc;
  padding: 1rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  background: #fafafa;
  max-width: 545px;
}

.tb-persons label {
  display: block;
  margin-bottom: .5rem;
}

.tb-month-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
}

.tb-month-nav button {
  background: #eee;
  border: 1px solid #ccc;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}
.tb-month-nav button:hover {
  background: #ddd;
}

.tb-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: .5rem;
}
.tb-date {
  flex: 1 0 22%;
  padding: 0.5rem 0;
  border-radius: 4px;
  border: 1px solid transparent;
  text-align: center;
  cursor: pointer;
	padding: 12px 24px;
}
.tb-date.tb-green { background: #d4f6d4; border-color: #6cbf6c; }
.tb-date.tb-yellow { background: #fff6cc; border-color: #d4b600; }
.tb-date.tb-red { background: #f8d7da; border-color: #d9534f; color: #900; cursor: not-allowed; }

.tb-date:hover { opacity: 0.85; }

.tb-legend {
  margin-top: .5rem;
  font-size: 0.85rem;
  color: #666;
}
.tb-legend span { font-size: 1rem; vertical-align: middle; }

.tb-times {
  margin-top: 1rem;
}
.tb-time-list button {
  display: block;
  width: 100%;
  margin-bottom: .25rem;
  padding: 0.5rem;
  text-align: center;
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.tb-time-list button:hover {
  background: #005f8d;
}

.tb-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: .5rem;
  text-align: center;
}

.tb-head {
  font-weight: bold;
  font-size: 0.85rem;
  padding: 2px 0;
}

.tb-empty {
  background: none;
  border: none;
}

.tb-date {
  padding: 0.5rem 0;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
	padding: 12px 24px;
}
.tb-date.tb-green { background: #d4f6d4; border-color: #6cbf6c; }
.tb-date.tb-yellow { background: #fff6cc; border-color: #d4b600; }
.tb-date.tb-red { background: #f8d7da; border-color: #d9534f; color: #900; cursor: not-allowed; }
.tb-date.tb-grey { background: #eee; color: #999; border: 1px solid #ccc; cursor: not-allowed; }

.tb-date:hover { opacity: 0.85; }

.tb-dates.tb-loading {
  position: relative;
  min-height: 200px; /* ensures space reserved */
}

.tb-skeleton {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.tb-skeleton div {
  background: #eee;
  height: 45px;
	width: 68px;
  border-radius: 4px;
  animation: tb-shimmer 1.5s infinite linear;
	padding: 12px 24px;
}

@keyframes tb-shimmer {
  0% { opacity: 0.6; }
  50% { opacity: 0.2; }
  100% { opacity: 0.6; }
}

.tb-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid #ccc;
  border-top: 3px solid #0073aa;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: tb-spin 1s linear infinite;
}

@keyframes tb-spin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 480px) {
	.tb-skeleton div {
		height: 36px;
	  width: 44px;
	}
	.tb-date {
		height: 36px;
	  width: 44px;
		padding: 4px 8px;
	}
}