/* Override default styles */
.tz-container,
.container,
.tool-content {
  width: auto;
  text-align: center;
}

html,
body,
table,
tbody,
tr,
td,
td div {
  height: 100%;
}

ul {
  margin-top: 0;
  margin-bottom: 0;
}

table {
  border: 0px solid transparent;
  table-layout: fixed;
  width: 100%;
  height: auto;
}

td {
  width: 33.3333%;
  padding: 4px 4px;
  border: 0px solid transparent;
}

textarea {
  width: 100%;
  height: 100%;
  resize: vertical;
  box-sizing: border-box;
  min-height: 500px;
}

td div {
  overflow: auto;
  font: 1em;
  text-align: left;
  white-space: pre-wrap;
}

h2 {
  display: inline;
  font-size: 100%;
}

#locations_wrapper {
  background: #f1f1f1;
  box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 20px;
  width: 100%;
  /* max-width: 960px; */
  position: relative;
  overflow: hidden;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
  flex-wrap: wrap;
  /* Allow wrapping on smaller screens */
}

.toolbar .item {
  display: flex;
  align-items: center;
  margin-right: 15px;
  margin-bottom: 10px;
  /* For wrapping */
}

.toolbar .item:last-child {
  margin-right: 0;
}

#settings-dropdown {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

#sd-activator {
  padding: 5px 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
  font-size: 0.9em;
  font-weight: 600;
}

#sd-dropdown {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 100;
  border-radius: 5px;
  padding: 8px 0;
  right: 0;
  top: 100%;
  margin-top: 5px;
}

#sd-dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#sd-dropdown ul li a {
  color: #333;
  padding: 8px 15px;
  text-decoration: none;
  display: block;
  font-size: 0.9em;
}

#sd-dropdown ul li a:hover {
  background-color: #f5f5f5;
}

.current_week_cell-txt {
  padding: 8px 8px;
  font-size: 14px;
  cursor: default;
  display: inline-block;
}

.current_week_cell {
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: default;
  display: inline-block;
  margin: 0 2px;
  transition: background-color 0.2s;
}

.current-cell {
  position: relative;
  background: #fff;
  margin-top: 4px;
}

.wknd-cell {
  color: #d77576;
}

#location {
  border: 1px solid #ccc;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 0.9em;
  width: 200px;
  outline: none;
}

.bttn-switch {
  margin: 3px;
  position: relative;
  background-color: #fff;
  border: 1px solid transparent;
  border-radius: 3px;
  display: inline-block;
  margin: 0 2px;
  transition: background-color 0.2s;
}

.bttn-switch:hover {
  background-color: #f6f6f6;
}

.bttn-switch-txt {
  padding: 8px 8px;
  font-size: 14px;
  cursor: pointer;
  display: inline-block;
}

#defaultText {
  color: #999;
  cursor: text;
}

.tzview {
  position: relative;
  padding: 0 10px;
  min-height: 400px;
  overflow-x: auto;
  /* Allow horizontal scrolling for hour lines */
}

.tz-container {
  display: flex;
  align-items: center;
  border-radius: 5px;
  margin-bottom: 5px;
  padding: 1px 5px;
  background-color: #f9f9f9;
  position: relative;
  cursor: move;
}

.tz-container .icon {
  font-weight: bold;
  font-size: 1.1em;
  width: 40px;
  text-align: center;
  margin-right: 10px;
  color: #555;
}

.tz-container .location {
  flex-grow: 1;
  width: 220px;
  margin-left: 5px;
  margin-right: 5px;
  overflow: hidden;
}

.tz-container .city {
  font-weight: bold;
  font-size: 1em;
}

.tz-container .country {
  font-size: 0.8em;
  color: #777;
}

.timezone-name {
  font-size: 0.8em;
  color: #777;
}

.utc-offset {
  font-size: 0.8em;
  color: #777;
}

.tz-container .time {
  font-size: 1em;
  font-weight: bold;
  white-space: nowrap;
}

.tz-container .date {
  font-size: 0.8em;
  color: #555;
  white-space: nowrap;
}

.overview-date-time {
  width: 100px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.timezone-overview {
  width: 300px;
  display: flex;
}

.timeline {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.timeline::-webkit-scrollbar {
  display: none;
}

.timeline li {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8em;
  min-width: 25px;
}

.timeline li .hour {
  font-size: 1em;
}

.timeline li .minute {
  font-size: 0.5em;
  margin-left: -0.5em;
}

.timeline .tod {
  width: 1.7em;
  display: inline-block;
}

.timeline li.tod_selected {
  background-color: #e0f2f7;
  border-radius: 5px;
}

.timeline ul.hours {
  display: flex;
}

.timeline div.date {
  text-align: left;
  font-size: 0.7rem;
}

.day_of_week {
  width: fit-content;
}

.timeline-row-buttons {
  text-align: center;
  width: 30px;
  white-space: nowrap;
}

.timeline-row-buttons .close {
  cursor: pointer;
}

.timeline-row-buttons .home-offset {
  font-size: 0.5rem;
  color: darkorange;
  display: block;
}

/*
Calendar day
Night
Morning
Day
Evening
*/
.timeline li.tod_c {
  color: #888;
}

.timeline li.tod_n {
  color: #666;
}

.timeline li.tod_m {
  color: #444;
}

.timeline li.tod_d {
  color: #222;
}

.timeline li.tod_e {
  color: #444;
}

.timeline li.tod_selected {
  color: #000;
}

.bttn-normal {
  background-color: #007bff;
  color: white;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 600;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
}

.bttn-normal:hover {
  background-color: #0056b3;
}

.sharing-bttn .bttn {
  width: 16px;
  height: 16px;
  margin-right: 5px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.location_list {
  position: absolute;
  background-color: #fff;
  border: 1px solid #ddd;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  display: none;
}

.location_list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.location_list li {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.9em;
}

.location_list li:hover,
.ac_over {
  background-color: #f0f0f0;
}

/*override default from base.scss*/
li {
  margin-bottom: 0;
}

ul {
  margin-left: 0.25rem;
}

#jsWarning {
  color: red;
  font-weight: bold;
  margin-top: 10px;
  display: none;
}

/* Message Box Styling */
.message-box-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.message-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.message-box h3 {
  margin-top: 0;
  color: #333;
}

.message-box p {
  margin-bottom: 20px;
  color: #555;
}

.message-box button {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
}

.message-box button:hover {
  background-color: #0056b3;
}

/* Hide timeline at max-width: $container-width */
@media (max-width: 480px) {
  .timeline {
    display: none !important;
  }

  .bttn-switch {
    display: none !important;
  }

  .current_week {
    display: none !important;
  }
}
