/* =========================================================
   WORLD CLOCK
   ========================================================= */

.world-clock {
  --clock-bg: #ffffff;
  --clock-border: #e9ecef;
  --clock-text: #17202a;
  --clock-muted: #6c757d;
  --clock-accent: #2563eb;

  width: 100%;

  background: var(--clock-bg);

  border: 1px solid var(--clock-border);
  border-radius: 18px;

  box-shadow:
    0 8px 30px rgba(0, 0, 0, .06);

  overflow: hidden;
}


/* =========================================================
   HEADER
   ========================================================= */

.world-clock-header {
  display: flex;

  align-items: center;
  justify-content: space-between;

  padding: 18px 24px;

  border-bottom: 1px solid var(--clock-border);

  background:
    linear-gradient(
      135deg,
      #f8fafc,
      #ffffff
    );
}


/* Título */

.world-clock-title {
  display: flex;

  align-items: center;
  gap: 10px;

  margin: 0;

  color: var(--clock-text);

  font-size: 1rem;
  font-weight: 700;

  letter-spacing: .01em;
}


/* Ícone */

.world-clock-title-icon {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  width: 36px;
  height: 36px;

  color: #ffffff;

  background: var(--clock-accent);

  border-radius: 10px;

  font-size: 1.1rem;
}


/* Status */

.world-clock-status {
  display: flex;

  align-items: center;
  gap: 7px;

  color: var(--clock-muted);

  font-size: .78rem;
}


/* Indicador verde */

.world-clock-status-dot {
  width: 7px;
  height: 7px;

  background: #22c55e;

  border-radius: 50%;

  box-shadow:
    0 0 0 4px rgba(34, 197, 94, .12);
}


/* =========================================================
   GRID
   ========================================================= */

.world-clock-grid {
  display: grid;

  grid-template-columns:
    repeat(4, 1fr);
}


/* =========================================================
   CIDADE
   ========================================================= */

.clock-city {
  position: relative;

  padding: 24px 22px;

  transition:
    background-color .2s ease;
}


/* Separador vertical */

.clock-city:not(:last-child)::after {
  content: "";

  position: absolute;

  top: 22px;
  right: 0;
  bottom: 22px;

  width: 1px;

  background: var(--clock-border);
}


/* Hover */

.clock-city:hover {
  background: #f8fafc;
}


/* =========================================================
   TOPO DA CIDADE
   ========================================================= */

.clock-city-top {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 10px;

  margin-bottom: 18px;
}


/* Localização */

.clock-location {
  display: flex;

  align-items: center;

  gap: 9px;

  min-width: 0;
}


/* Bandeira */

.clock-flag {
  font-size: 1.35rem;

  line-height: 1;
}


/* Nome */

.clock-city-name {
  margin: 0;

  color: var(--clock-text);

  font-size: .95rem;

  font-weight: 700;

  white-space: nowrap;
}


/* País */

.clock-country {
  margin: 2px 0 0;

  color: var(--clock-muted);

  font-size: .72rem;
}


/* Dia */

.clock-day {
  padding: 4px 8px;

  color: var(--clock-muted);

  background: #f1f3f5;

  border-radius: 20px;

  font-size: .68rem;

  font-weight: 600;

  white-space: nowrap;
}


/* =========================================================
   HORA
   ========================================================= */

.clock-time {
  margin: 0;

  color: var(--clock-text);

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  font-size:
    clamp(1.8rem, 3vw, 2.35rem);

  font-weight: 700;

  letter-spacing: -.04em;

  line-height: 1;
}


/* Segundos */

.clock-time-seconds {
  color: var(--clock-accent);
}


/* =========================================================
   DATA
   ========================================================= */

.clock-date {
  margin-top: 9px;

  color: var(--clock-muted);

  font-size: .76rem;
}


/* =========================================================
   UTC
   ========================================================= */

.clock-offset {
  display: inline-flex;

  align-items: center;

  gap: 5px;

  margin-top: 14px;

  color: var(--clock-accent);

  font-size: .7rem;

  font-weight: 600;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991.98px) {

  .world-clock-grid {
    grid-template-columns:
      repeat(2, 1fr);
  }


  /*
     Remove o separador da segunda coluna
  */

  .clock-city:nth-child(2)::after {
    display: none;
  }


  /*
     Linha horizontal entre
     as duas linhas
  */

  .clock-city:nth-child(-n+2) {
    border-bottom:
      1px solid var(--clock-border);
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 575.98px) {

  .world-clock-header {
    padding: 15px 18px;
  }


  /*
     Esconde o texto de status
     em telas pequenas
  */

  .world-clock-status {
    display: none;
  }


  /*
     Uma coluna
  */

  .world-clock-grid {
    grid-template-columns: 1fr;
  }


  .clock-city {
    padding: 20px 18px;

    border-bottom:
      1px solid var(--clock-border);
  }


  .clock-city:last-child {
    border-bottom: 0;
  }


  /*
     Remove separadores verticais
  */

  .clock-city::after {
    display: none !important;
  }


  .clock-time {
    font-size: 2rem;
  }

}
