@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

.time-in-page {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  color: #111827;
  background: #f8fafc;
  padding: 48px 18px;
  font-family: inherit;
}

.time-in-page *,
.time-in-page *::before,
.time-in-page *::after {
  box-sizing: border-box;
}

.time-in-page__inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.time-in-page__header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 28px;
}

.time-in-page__title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 4.5rem);
  line-height: 1.05;
  font-weight: 760;
  letter-spacing: 0;
}

.time-in-page__subtitle {
  margin: 14px 0 0;
  color: #475569;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  letter-spacing: 0;
}

.time-in-page__tool {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid #dbe5f0;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

.time-in-page__accent {
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.time-in-page__topline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.time-in-page__pin {
  width: 12px;
  height: 12px;
  border: 3px solid #2563eb;
  border-radius: 50%;
  background: #eff6ff;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.08);
  flex: 0 0 auto;
}

.time-in-page__location {
  margin: 0;
  color: #1e293b;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

.time-in-page__clock-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  margin: 8px 0 8px;
}

.time-in-page__clock {
  color: #0f172a;
  font-size: clamp(3.05rem, 10vw, 6.75rem);
  line-height: 1;
  font-weight: 780;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.time-in-page__period {
  min-width: 2.4em;
  color: #2563eb;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1;
  font-weight: 750;
  letter-spacing: 0;
}

.time-in-page__date,
.time-in-page__weekday {
  text-align: center;
  line-height: 1.45;
  letter-spacing: 0;
}

.time-in-page__date {
  color: #334155;
  font-size: clamp(1rem, 1.7vw, 1.25rem);
  font-weight: 650;
}

.time-in-page__weekday {
  margin-top: 4px;
  color: #64748b;
  font-size: clamp(0.95rem, 1.5vw, 1.08rem);
  font-weight: 550;
}

.time-in-page__details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.time-in-page__detail {
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
}

.time-in-page__detail-label {
  display: block;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.time-in-page__detail-value {
  display: block;
  margin-top: 6px;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.time-in-page__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
}

.time-in-page__toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.time-in-page__button {
  appearance: none;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #1e293b;
  cursor: pointer;
  min-height: 44px;
  padding: 11px 18px;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.1;
  font-weight: 760;
  letter-spacing: 0;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.time-in-page__button:hover {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

.time-in-page__button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.32);
  outline-offset: 3px;
}

.time-in-page__button--active,
.time-in-page__button--active:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.time-in-page__button--copy {
  border-color: #0f172a;
  background: #0f172a;
  color: #ffffff;
}

.time-in-page__button--copy:hover {
  border-color: #1e293b;
  background: #1e293b;
  color: #ffffff;
}

.time-in-page__status,
.time-in-page__error {
  min-height: 1.35em;
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.94rem;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: 0;
}

.time-in-page__status {
  color: #0f766e;
}

.time-in-page__error {
  color: #b91c1c;
}

.time-in-page__tool.time-in-page__tool--error .time-in-page__clock,
.time-in-page__tool.time-in-page__tool--error .time-in-page__date,
.time-in-page__tool.time-in-page__tool--error .time-in-page__weekday {
  color: #64748b;
}

@media (prefers-reduced-motion: reduce) {
  .time-in-page .time-in-page__button {
    transition: none;
  }
}

@media (min-width: 320px) and (max-width: 374px) {
  .time-in-page {
    padding: 30px 12px;
  }

  .time-in-page__header {
    margin-bottom: 18px;
  }

  .time-in-page__title {
    font-size: clamp(1.8rem, 10vw, 2.25rem);
  }

  .time-in-page__subtitle {
    font-size: 0.96rem;
  }

  .time-in-page__tool {
    padding: 24px 14px 20px;
    border-radius: 18px;
  }

  .time-in-page__topline {
    gap: 8px;
    margin-bottom: 14px;
  }

  .time-in-page__clock-wrap {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .time-in-page__clock {
    font-size: clamp(2.55rem, 15vw, 3.2rem);
  }

  .time-in-page__period {
    min-width: 0;
    font-size: 0.95rem;
  }

  .time-in-page__details {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 20px;
  }

  .time-in-page__detail {
    padding: 12px;
    border-radius: 13px;
  }

  .time-in-page__controls {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 20px;
  }

  .time-in-page__toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .time-in-page__button {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}

@media (min-width: 375px) and (max-width: 429px) {
  .time-in-page {
    padding: 34px 14px;
  }

  .time-in-page__header {
    margin-bottom: 20px;
  }

  .time-in-page__title {
    font-size: clamp(2rem, 9vw, 2.55rem);
  }

  .time-in-page__subtitle {
    font-size: 0.98rem;
  }

  .time-in-page__tool {
    padding: 26px 16px 22px;
    border-radius: 20px;
  }

  .time-in-page__clock-wrap {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .time-in-page__clock {
    font-size: clamp(3rem, 15vw, 3.8rem);
  }

  .time-in-page__period {
    min-width: 0;
    font-size: 1rem;
  }

  .time-in-page__details {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 22px;
  }

  .time-in-page__controls {
    flex-direction: column;
    align-items: stretch;
    gap: 11px;
    margin-top: 22px;
  }

  .time-in-page__toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .time-in-page__button {
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
  }
}

@media (min-width: 430px) and (max-width: 767px) {
  .time-in-page {
    padding: 38px 16px;
  }

  .time-in-page__header {
    margin-bottom: 22px;
  }

  .time-in-page__tool {
    padding: 28px 20px 24px;
    border-radius: 22px;
  }

  .time-in-page__clock {
    font-size: clamp(3.8rem, 14vw, 5.25rem);
  }

  .time-in-page__details {
    grid-template-columns: 1fr;
    gap: 11px;
    margin-top: 24px;
  }

  .time-in-page__controls {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
  }

  .time-in-page__toggle {
    justify-content: center;
  }

  .time-in-page__button {
    min-height: 44px;
    padding: 11px 16px;
  }

  .time-in-page__button--copy {
    flex: 1 1 190px;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .time-in-page {
    padding: 46px 24px;
  }

  .time-in-page__header {
    margin-bottom: 26px;
  }

  .time-in-page__tool {
    padding: 32px 30px 28px;
    border-radius: 24px;
  }

  .time-in-page__clock {
    font-size: clamp(5.2rem, 9vw, 6.25rem);
  }

  .time-in-page__details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .time-in-page__controls {
    gap: 14px;
  }

  .time-in-page__button {
    min-height: 46px;
    padding: 12px 19px;
  }
}

@media (min-width: 1024px) {
  .time-in-page {
    padding: 56px 28px;
  }

  .time-in-page__header {
    margin-bottom: 30px;
  }

  .time-in-page__tool {
    padding: 38px 38px 32px;
    border-radius: 26px;
  }

  .time-in-page__clock {
    font-size: clamp(5.75rem, 7vw, 6.9rem);
  }

  .time-in-page__details {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
  }

  .time-in-page__detail {
    padding: 16px;
  }

  .time-in-page__controls {
    margin-top: 28px;
  }

  .time-in-page__button {
    min-height: 46px;
    padding: 12px 20px;
  }
}