/**
    For styling webpage
*/
/* Add navigation styles */
.nav-bar {
  background-color: #1a73e8;
  color: white;
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

.commutes {
  align-content: stretch;
  color: #202124;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  font-family: Arial, sans-serif;
  height: 100%;
  min-height: 256px;
  min-width: 360px;
  overflow: auto;
  width: 100%;
}

.commutes-info {
  flex: 0 0 110px;
  max-width: 100%;
  overflow: hidden;
}

.commutes-initial-state {
  border-radius: 8px;
  border: 1px solid #dadce0;
  display: flex;
  height: 98px;
  margin-top: 8px;
  padding: 0 16px;
}

.commutes-initial-state svg {
  align-self: center;
}

.commutes-initial-state .description {
  align-self: center;
  flex-grow: 1;
  padding: 0 16px;
}

.commutes-initial-state .description .heading {
  font: 22px/28px Arial, sans-serif;
  margin: 0;
}

.commutes-initial-state .description p {
  color: #5f6368;
  font: 13px/20px Arial, sans-serif;
  margin: 0;
}

.commutes-initial-state .add-button {
  align-self: center;
  background-color: #1a73e8;
  border-color: #1a73e8;
  border-radius: 4px;
  border-style: solid;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  fill: #fff;
  padding: 8px 16px 8px 8px;
  white-space: nowrap;
}

.commutes-initial-state .add-button .label {
  font: normal 600 15px/24px Arial, sans-serif;
  padding-left: 8px;
}

@media (max-width: 535px) {
  .commutes-initial-state svg {
    display: none;
  }

  .commutes-initial-state .description {
    padding-left: 0;
  }

  .commutes-initial-state .description .heading {
    font-weight: bold;
    font-size: 15px;
    line-height: 24px;
  }
}

.commutes-destinations {
  display: none;
  position: relative;
  width: 100%;
}

.commutes-destinations:hover .visible {
  display: block;
}

.commutes-destinations .destinations-container {
  display: flex;
  overflow-x: auto;
  padding: 8px 8px 4px 8px;
  white-space: nowrap;
  width: 100%;
}

.commutes-destinations .destinations-container::-webkit-scrollbar {
  display: none;
}

.commutes-destinations .destinations-container::-webkit-scrollbar-thumb {
  background-color: #dadce0;
  width: 4px;
}

.commutes-destinations .destination-list {
  display: flex;
  flex-grow: 1;
}

.commutes-destinations .right-control,
.commutes-destinations .left-control {
  background-color: #fff;
  border-radius: 40px;
  border-style: none;
  bottom: 35px;
  box-shadow: 0 2px 3px 0 rgb(60 64 67 / 30%),
    0 6px 10px 4px rgb(60 64 67 / 15%);
  cursor: pointer;
  fill: #616161;
  height: 40px;
  padding: 8px;
  position: absolute;
  width: 40px;
  z-index: 100;
}

.commutes-destinations .right-control:hover,
.commutes-destinations .left-control:hover {
  background-color: #f1f3f4;
}

.commutes-destinations .left-control {
  left: 16px;
}

.commutes-destinations .right-control {
  right: 16px;
}

.commutes-destinations .add-button {
  align-items: center;
  background-color: #e8f0fe;
  border-radius: 8px;
  border-color: #e8f0fe;
  border-style: solid;
  color: #1967d2;
  cursor: pointer;
  display: flex;
  fill: #1967d2;
  flex-direction: column;
  flex-grow: 1;
  font-weight: bold;
  gap: 4px;
  justify-content: center;
  min-width: 156px;
  padding: 20px 16px;
}

.commutes-destinations .add-button:hover {
  background-color: #d2e3fc;
  border-color: #d2e3fc;
  color: #185abc;
  fill: #185abc;
}

.commutes-destinations .destination-container {
  cursor: pointer;
  display: flex;
  flex: 1 1 0;
  position: relative;
}

.commutes-destinations .destination {
  border-radius: 4px;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3),
    0 1px 3px 1px rgba(60, 64, 67, 0.15);
  color: #5f6368;
  fill: #5f6368;
  height: 72px;
  justify-content: space-between;
  margin-right: 8px;
  min-width: 256px;
  overflow: hidden;
  padding: 12px;
  position: relative;
  width: 100%;
}

.commutes-destinations .active:after {
  background-color: #4285f4;
  content: "";
  display: block;
  height: 4px;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

.commutes-destinations .active+.destination-controls .directions-button {
  fill: #4285f4;
}

.commutes-destinations .active+.destination-controls .edit-button {
  opacity: 1;
}

.commutes-destinations .active .metadata .location-marker {
  background-color: #fce8e6;
  color: #d93025;
}

.commutes-destinations .destination-container:hover,
.commutes-destinations .destination-container:focus-within {
  background-color: #f8f9fa;
}

.commutes-destinations .destination-container:hover .edit-button,
.commutes-destinations .destination-container:focus-within .edit-button {
  opacity: 1;
}

.commutes-destinations .destination .destination-content {
  font-size: 12px;
  line-height: 20px;
  overflow: hidden;
}

.commutes-destinations .destination .metadata {
  align-items: center;
  display: flex;
  margin-bottom: 4px;
  gap: 4px;
}

.commutes-destinations .destination-container svg {
  height: 18px;
  width: 18px;
}

.commutes-destinations .destination .location-marker {
  background-color: #f1f3f4;
  border-radius: 8px;
  color: #616161;
  display: inline-block;
  font-size: 14px;
  font-weight: bold;
  line-height: 16px;
  text-align: center;
  width: 16px;
}

.commutes-destinations .destination .address {
  margin-bottom: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commutes-destinations .destination .address abbr {
  text-decoration: none;
}

.commutes-destinations .destination .destination-eta {
  color: #202124;
  font-weight: bold;
  font-size: 22px;
  line-height: 28px;
}

.commutes-destinations .destination-container .destination-controls {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  min-width: 70px;
  position: absolute;
  right: 20px;
  text-align: right;
  top: 12px;
  white-space: nowrap;
}

.commutes-destinations .destination-container .directions-button {
  align-items: center;
  background-color: #fff;
  border-radius: 32px;
  border: 1px solid #dadce0;
  cursor: pointer;
  display: flex;
  fill: #5f6368;
  height: 32px;
  justify-content: center;
  margin: 0;
  width: 34px;
}

.commutes-destinations .destination-container .directions-button:hover {
  background-color: #e8f0fe;
  fill: #4285f4;
}

.commutes-destinations .destination-container .edit-button {
  background-color: #fff;
  border-radius: 20px;
  border: 1px solid #dadce0;
  opacity: 0;
  font-size: 14px;
  font-weight: bold;
  line-height: 22px;
  margin: 8px 0 0 0;
  padding: 3px 12px 3px 5px;
  fill: #616161;
  color: #616161;
  cursor: pointer;
}

.commutes-destinations .destination-container .edit-button svg {
  display: inline-block;
  font-size: 20px;
  line-height: 20px;
  width: 20px;
  vertical-align: middle;
}

.commutes-destinations .destination-container .edit-button:hover {
  background-color: #f1f3f4;
}

.commutes-map {
  flex: 1;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.commutes-map .map-view {
  background-color: rgb(229, 227, 223);
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

.commutes-modal-container {
  align-items: center;
  background-color: rgba(0, 0, 0, 0.4);
  display: none;
  height: 100%;
  justify-content: center;
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.commutes-modal {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2), 0 4px 5px rgba(0, 0, 0, 0.14),
    0 1px 10px rgba(0, 0, 0, 0.12);
  height: 256px;
  position: absolute;
  width: 360px;
}

.commutes-modal .content {
  padding: 24px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.commutes-modal .heading {
  font: 24px/32px Arial, sans-serif;
  margin: 0;
}

.commutes-modal input {
  font: 16px/24px Arial, sans-serif;
  padding: 10px;
  box-sizing: border-box;
  width: 100%;
}

.commutes-modal .error {
  background-color: #fce4e4;
  border: 1px solid #c03;
}

.commutes-modal .error-message {
  color: #c03;
  display: inline-block;
  font: 12px/14px Arial, sans-serif;
  margin: 0 0 5px;
}

.commutes-modal .travel-modes {
  display: flex;
  flex-direction: row;
  height: 40px;
  margin-bottom: 12px;
  padding: 0;
  width: 100%;
}

.commutes-modal .travel-modes [type="radio"] {
  height: 0;
  opacity: 0;
  position: absolute;
  width: 0;
}

.commutes-modal .travel-modes label {
  align-items: center;
  border: solid #dadce0;
  border-width: 1px 0.031em;
  cursor: pointer;
  display: inline-flex;
  fill: #5f6368;
  flex: 1;
  justify-content: center;
  padding: 6px;
  position: relative;
  transition: background 0.5s, fill 0.5s;
}

.commutes-modal .travel-modes label:hover {
  background-color: #f1f3f4;
}

.commutes-modal .travel-modes svg {
  height: 24px;
  width: 24px;
}

.commutes-modal .travel-modes .left-label {
  border-left-width: 1px;
  border-radius: 4px 0 0 4px;
}

.commutes-modal .travel-modes .right-label {
  border-radius: 0 4px 4px 0;
  border-right-width: 1px;
}

.commutes-modal .travel-modes input[type="radio"]:checked+label {
  background: #e8f0fe;
  fill: #1967d2;
}

.commutes-modal .travel-modes input[type="radio"]:focus-visible+label {
  outline: 2px solid Highlight;
  outline: 2px solid -webkit-focus-ring-color;
  outline-offset: -2px;
}

.commutes-modal .modal-action-bar {
  display: flex;
  justify-content: flex-end;
}

.commutes-modal .modal-action-bar button {
  background: #ffff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  line-height: 32px;
}

.commutes-modal .modal-action-bar .delete-destination-button {
  color: #c5221f;
  left: 18px;
  position: absolute;
}

.commutes-modal .modal-action-bar .cancel-button {
  color: #0000008a;
}

.commutes-modal .modal-action-bar .add-destination-button,
.commutes-modal .modal-action-bar .edit-destination-button {
  color: #1a73e8;
}

.hide {
  display: none;
}

/* Enhanced rail line selector */
.rail-line-selector {
  background-color: #fff;
  padding: 12px;
  margin: 10px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  position: absolute;
  top: 50px;
  left: 10px;
  z-index: 5;
  min-width: 220px;
}

.rail-line-selector label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.rail-line-selector select {
  padding: 8px 12px;
  font-size: 14px;
  border: 2px solid #ddd;
  border-radius: 4px;
  min-width: 200px;
  background-color: #fff;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.rail-line-selector select:focus {
  outline: none;
  border-color: #4285f4;
  box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.rail-line-selector select:hover {
  border-color: #999;
}

.station-marker {
  cursor: pointer;
}

.station-info-window {
  padding: 5px;
  max-width: 200px;
}

/* Enhanced line legend */
.line-legend {
  position: absolute;
  bottom: 30px;
  left: 10px;
  z-index: 5;
  display: none;
  max-width: 250px;
}

.line-legend.visible {
  display: block;
}

.line-color-indicator {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 50%;
}

/* Enhanced station info windows */
.gm-ui-hover-effect {
  opacity: 0.6;
}

.gm-ui-hover-effect:hover {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .rail-line-selector {
    position: relative;
    top: 0;
    left: 0;
    margin: 10px;
    width: calc(100% - 20px);
  }

  .line-legend {
    bottom: 100px;
    left: 10px;
    right: 10px;
    max-width: none;
  }
}