:root {
  --wtb-bg: #fff;
  --wtb-border: #d2d2d2;
  --wtb-header-bg: #f6f6f6;
  --wtb-header-text: #888;
  --wtb-row-hover: #f9f9f9;
  --wtb-current-hour: #eaf3fb;
  --wtb-current-hour-border: #4f8edc;
  --wtb-hour-bg: #e0eaf7;
  --wtb-hour-text: #222;
  --wtb-hour-label: #888;
  --wtb-city-main: #222;
  --wtb-city-country: #888;
  --wtb-abbr-bg: #e4e4e4;
  --wtb-abbr-text: #555;
  --wtb-btn: #888;
  --wtb-btn-hover: #222;
  --wtb-date-tab-bg: #fff;
  --wtb-date-tab-active: #4f8edc;
  --wtb-date-tab-border: #d2d2d2;
  --wtb-date-tab-text: #888;
  --wtb-date-tab-active-text: #fff;
}

.wtb-scheduler-container {
  background: var(--wtb-bg);
  border: 1px solid var(--wtb-border);
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 0 0 18px 0;
  margin: 30px auto;
  max-width: 1200px;
  font-family: 'Segoe UI', Arial, sans-serif;
}

/* Toolbar */
.wtb-toolbar {
  display: flex;
  align-items: center;
  padding: 16px 18px 10px 18px;
  background: var(--wtb-header-bg);
  border-bottom: 1px solid var(--wtb-border);
  gap: 12px;
}
.wtb-add-btn {
  font-size: 1.2em;
  background: none;
  border: none;
  color: var(--wtb-btn);
  cursor: pointer;
  margin-right: 8px;
  transition: color 0.2s;
}
.wtb-add-btn:hover { color: var(--wtb-btn-hover); }
#timezone-search {
  flex: 1;
  padding: 7px 12px;
  border: 1px solid var(--wtb-border);
  border-radius: 4px;
  font-size: 1em;
  background: #fff;
}
.wtb-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wtb-settings-btn {
  background: none;
  border: none;
  font-size: 1.3em;
  color: var(--wtb-btn);
  cursor: pointer;
  margin-right: 6px;
}
.wtb-settings-btn:hover { color: var(--wtb-btn-hover); }
.wtb-hour-toggle {
  border: 1px solid var(--wtb-border);
  background: #fff;
  color: var(--wtb-btn);
  border-radius: 4px;
  font-size: 0.95em;
  padding: 3px 9px;
  margin-left: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.wtb-hour-toggle.active,
.wtb-hour-toggle:focus {
  background: var(--wtb-date-tab-active);
  color: var(--wtb-date-tab-active-text);
  outline: none;
}

/* Date Tabs */
.wtb-date-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 18px 10px 18px;
  border-bottom: 1px solid var(--wtb-border);
  background: var(--wtb-header-bg);
}
.wtb-date-tab {
  border: 1px solid var(--wtb-date-tab-border);
  border-radius: 4px;
  background: var(--wtb-date-tab-bg);
  color: var(--wtb-date-tab-text);
  padding: 3px 13px;
  font-size: 1em;
  cursor: pointer;
  margin-right: 2px;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.wtb-date-tab.selected,
.wtb-date-tab:focus {
  background: var(--wtb-date-tab-active);
  color: var(--wtb-date-tab-active-text);
  border-color: var(--wtb-date-tab-active);
  font-weight: bold;
  outline: none;
}

/* Scheduler Table */
.wtb-scheduler-table {
  width: 100%;
  padding: 0 0 0 0;
}
.wtb-header-row {
  display: flex;
  align-items: stretch;
  background: var(--wtb-header-bg);
  border-bottom: 1px solid var(--wtb-border);
}
.wtb-header-cell.wtb-location-header {
  flex: 0 0 48px; /* same width as controls column */
  border-right: 1px solid var(--wtb-border);
}

.wtb-header-cell.wtb-city-info-header {
  flex: 0 0 180px; /* same width as city info column */
  border-right: 1px solid var(--wtb-border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 12px;
}

.wtb-header-location-info .wtb-city-name {
  font-weight: 600;
  font-size: 1em;
}
.wtb-header-location-info .wtb-city-time {
  font-size: 1em;
  margin-top: 4px;
}
.wtb-header-location-info .wtb-city-date {
  font-size: 0.9em;
  color: var(--wtb-hour-label);
  margin-top: 2px;
}
.wtb-header-hours {
  display: flex;
  flex: 1;
  overflow-x: auto;
}
.wtb-hour-header-cell {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  text-align: center;
  color: var(--wtb-header-text);
  font-size: 1em;
  font-weight: 500;
  padding: 7px 0 4px 0;
  border-right: 1px solid var(--wtb-border);
  background: var(--wtb-header-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}
.wtb-hour-header-cell .wtb-hour-label {
  font-size: 0.95em;
}
.wtb-hour-header-cell .wtb-ampm-label {
  font-size: 0.78em;
  color: var(--wtb-hour-label);
  margin-top: 1px;
}
.wtb-hour-header-cell .wtb-date-label {
  font-size: 0.77em;
  color: #b00;
  margin-top: 2px;
  font-weight: 500;
}

/* City Rows */
.wtb-city-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--wtb-border);
  background: var(--wtb-bg);
}

.wtb-city-controls {
  flex: 0 0 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 4px;
  border-right: 1px solid var(--wtb-border);
}

.wtb-city-info {
  flex: 0 0 180px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wtb-city-grid {
  flex: 1;
  display: flex;
  overflow-x: auto;
  align-items: stretch;
}



.wtb-remove-btn, .wtb-home-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--wtb-btn);
  font-size: 1.2em;
  margin-bottom: 7px;
  transition: color 0.2s;
}
.wtb-remove-btn:hover, .wtb-home-btn:hover {
  color: var(--wtb-btn-hover);
}
.wtb-home-label {
  color: var(--wtb-date-tab-active);
  font-size: 1.15em;
  font-weight: bold;
  margin-bottom: 7px;
}

.wtb-city-main {
  font-weight: 400;
  font-size: 1em;
  color: var(--wtb-city-main);
  display: flex;
  align-items: center;
  gap: 7px;
}

.wtb-city-container {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.wtb-tz-abbr {
  background: var(--wtb-abbr-bg);
  color: var(--wtb-abbr-text);
  border-radius: 3px;
  font-size: 0.6em;
  padding: 1px 6px;
  margin-left: 4px;
}
.wtb-city-country {
  color: var(--wtb-city-country);
  font-size: 0.98em;
  margin-top: 1px;
}
.wtb-city-time {
  font-size: 1em;
  font-weight: 400;
  margin-top: 2px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.wtb-city-time .wtb-ampm {
  font-size: 0.95em;
  color: var(--wtb-hour-label);
  font-weight: normal;
}
.wtb-city-time .wtb-current-date {
  font-size: 0.92em;
  color: var(--wtb-hour-label);
  font-weight: normal;
  margin-left: 4px;
}


.wtb-hour-cell {
  width: 50px;
  min-width: 50px;
  max-width: 50px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--wtb-hour-bg);
  color: var(--wtb-hour-text);
  font-size: 1.05em;
  border-right: 1px solid var(--wtb-border);
  border-bottom: none;
  position: relative;
  transition: background 0.2s, color 0.2s;
}
.wtb-hour-cell .wtb-hour {
  font-size: 1.07em;
  font-weight: 500;
}
.wtb-hour-cell .wtb-ampm {
  font-size: 0.85em;
  color: var(--wtb-hour-label);
  font-weight: 400;
}
.wtb-hour-cell .wtb-date-label {
  font-size: 0.8em;
  color: #b00;
  position: absolute;
  bottom: -16px;
  left: 0;
  right: 0;
  text-align: center;
}

.wtb-hour-cell.current {
  border: 2px solid var(--wtb-current-hour-border);
  background: var(--wtb-current-hour);
  color: #000;
  z-index: 1;
  box-sizing: border-box;
}

/* Responsive */
@media (max-width: 900px) {
  .wtb-scheduler-container { max-width: 100vw; }
  .wtb-header-cell.wtb-location-header,
  .wtb-city-info { min-width: 120px; max-width: 120px; }
  .wtb-hour-cell, .wtb-hour-header-cell { width: 38px; min-width: 38px; max-width: 38px; }
}
@media (max-width: 600px) {
  .wtb-toolbar { flex-direction: column; gap: 7px; padding: 12px 4px 8px 4px; }
  .wtb-date-tabs { padding: 8px 4px 8px 4px; }
  .wtb-header-cell.wtb-location-header,
  .wtb-city-info { min-width: 90px; max-width: 90px; }
  .wtb-hour-cell, .wtb-hour-header-cell { width: 30px; min-width: 30px; max-width: 30px; font-size: 0.9em; }
}

/* Scrollbar styling for horizontal grid */
.wtb-header-hours::-webkit-scrollbar,
.wtb-city-grid::-webkit-scrollbar {
  height: 7px;
}
.wtb-header-hours::-webkit-scrollbar-thumb,
.wtb-city-grid::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 4px;
}
.wtb-header-hours::-webkit-scrollbar-track,
.wtb-city-grid::-webkit-scrollbar-track {
  background: #f1f1f1;
}
.wtb-header-hours, .wtb-city-grid {
  scrollbar-width: thin;
  scrollbar-color: #c4c4c4 #f1f1f1;
}
