:root {
  --title: "Time Zone Converter";
  --author: "Matt Cannon";
  --contact: "mc@mattcannon.design";
  --description: "A sleek and efficient time zone converter with country flags, allowing users to easily convert times between different time zones around the world.";
  --keywords: "time zone, converter, international, travel, time difference, world clock, country flags, select2, javascript, css, timezone api, interactive, business tool, global communication, meeting planner";
  --last-modified: "2025-02-24";
  --content-language: "en";
  --generator: "HTML5, CSS3, Javascript, Select2, JQuery, FlagCDN";
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Rubik", sans-serif;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #222325;
  height: 100vh;
  padding: 20px;
}
.main {
  border: 2px solid rgb(100, 100, 100);
  padding: 20px;
  background-color: rgb(240, 240, 240);
  width: 100%;
  max-width: 550px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.conversion-container {
  font-size: 16px;
  margin-bottom: 20px;
}
.select-timezone {
  width: 100%;
  margin-bottom: 15px;
  height: 60px !important;
}
label {
  display: block;
  margin-bottom: 10px;
  color: #222325;
}
button {
  padding: 12px;
  font-size: 16px;
  cursor: pointer;
  background-color: #222325;
  color: rgb(255, 255, 255);
  border: none;
  border-radius: 30px;
  transition: background-color 0.3s;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
button:hover {
  background-color: rgb(60, 60, 60);
}
.convert-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.input-time-container {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  width: 100%;
}
.input-time-container > div {
  flex: 1;
  position: relative;
}
#inputDate,
#inputTime {
  padding: 10px;
  border: 1px solid rgb(200, 200, 200);
  border-radius: 5px;
  height: 45px;
  font-size: 16px;
  width: 100%;
}
#result {
  font-size: 16px;
  text-align: center;
  margin-top: 20px;
  color: #333333;
}
table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  border-radius: 5px;
  overflow: hidden;
}
table th {
  background-color: #222325;
  color: white;
  text-align: left;
  padding: 10px;
  border-right: 1px solid white;
}
table th:last-child {
  border-right: none;
}
table td {
  padding: 10px;
  text-align: left;
  border: 1px solid rgb(200, 200, 200);
  word-break: break-word;
}
table td > div {
  min-width: 0;
  max-width: 100%;
}
table td img {
  vertical-align: middle;
  width: 24px;
  height: 18px;
  object-fit: cover;
  margin-right: 8px;
  flex-shrink: 0;
  border: 1px solid #eee;
}
table th:first-child {
  border-top-left-radius: 5px;
}
table th:last-child {
  border-top-right-radius: 5px;
}
table tr:last-child td:first-child {
  border-bottom-left-radius: 5px;
}
table tr:last-child td:last-child {
  border-bottom-right-radius: 5px;
}
.select2-container .select2-selection--single {
  height: 45px !important;
  display: flex;
  align-items: center;
}
.select2-selection__rendered {
  line-height: 45px !important;
}
.select2-selection__arrow {
  height: 45px !important;
}
.select2-results__option {
  display: flex;
  align-items: center;
  gap: 8px;
}
.select2-results__option img {
  flex-shrink: 0;
}
.select2-selection__rendered img {
  margin-right: 8px;
}
.select2-container--default
  .select2-selection--single
  .select2-selection__placeholder {
  color: #222325;
}
@media (max-width: 600px) {
  .input-time-container {
    flex-direction: column;
  }
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  height: 40px !important;
  font-size: 16px !important;
}

.custom-time-picker {
  position: relative;
  width: 100%;
}

.custom-time-picker input[type="time"] {
  padding-right: 40px;
}

.time-picker-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
  cursor: pointer;
  font-size: 18px;
  z-index: 1;
}

.time-picker-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 260px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  padding: 15px;
  display: none;
  z-index: 100;
  margin-top: 8px;
}

.time-picker-dropdown.active {
  display: block;
}

.clock-face {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: #f0f0f0;
  position: relative;
  margin: 0 auto 15px;
  border: 2px solid #ddd;
}

.clock-center {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #222325;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.clock-hour-hand, .clock-minute-hand {
  position: absolute;
  background: #222325;
  transform-origin: bottom center;
  bottom: 50%;
  left: 50%;
  z-index: 1;
  border-radius: 4px;
}

.clock-hour-hand {
  width: 4px;
  height: 35px;
  transform: translateX(-50%) rotate(0deg);
}

.clock-minute-hand {
  width: 2px;
  height: 50px;
  transform: translateX(-50%) rotate(0deg);
}

.clock-numbers {
  position: relative;
  width: 100%;
  height: 100%;
}

.clock-numbers .number {
  position: absolute;
  font-size: 12px;
  color: #333;
  text-align: center;
  width: 24px;
  height: 24px;
  line-height: 24px;
  cursor: pointer;
  border-radius: 50%;
}

.clock-numbers .number:hover {
  background: rgba(0,0,0,0.1);
}

.number[data-hour="12"] { top: 6px; left: calc(50% - 12px); }
.number[data-hour="1"] { top: 14px; right: 34px; }
.number[data-hour="2"] { top: 34px; right: 14px; }
.number[data-hour="3"] { top: calc(50% - 12px); right: 6px; }
.number[data-hour="4"] { bottom: 34px; right: 14px; }
.number[data-hour="5"] { bottom: 14px; right: 34px; }
.number[data-hour="6"] { bottom: 6px; left: calc(50% - 12px); }
.number[data-hour="7"] { bottom: 14px; left: 34px; }
.number[data-hour="8"] { bottom: 34px; left: 14px; }
.number[data-hour="9"] { top: calc(50% - 12px); left: 6px; }
.number[data-hour="10"] { top: 34px; left: 14px; }
.number[data-hour="11"] { top: 14px; left: 34px; }

.time-picker-selectors {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-value-selectors {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.hour-selector, .minute-selector, .ampm-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.time-separator {
  margin: 0 8px;
  font-size: 20px;
  font-weight: bold;
  align-self: center;
}

.hour-value, .minute-value, .ampm-value {
  font-size: 18px;
  font-weight: 500;
  margin: 5px 0;
  width: 35px;
  text-align: center;
}

.arrow-up, .arrow-down {
  background: none;
  border: none;
  color: #222325;
  cursor: pointer;
  padding: 2px;
  font-size: 14px;
}

.arrow-up:hover, .arrow-down:hover {
  color: #555;
}

.time-set-button {
  padding: 8px 15px;
  background-color: #222325;
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 14px;
  font-weight: 500;
}

.time-set-button:hover {
  background-color: #444;
}

.custom-date-input {
  position: relative;
  width: 100%;
}

.custom-date-input input[type="date"] {
  padding-right: 40px;
}

.date-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
  cursor: pointer;
  font-size: 18px;
  z-index: 1;
}

.custom-date-input {
  position: relative;
  width: 100%;
}

.custom-date-input input[type="date"] {
  padding-right: 40px;
  width: 100%;
  background-color: #fff;
}

.date-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #555;
  font-size: 18px;
  pointer-events: none; /* Prevents the icon from intercepting clicks */