/* =========================================================
   DaysToEvents — Time Zones Tool CSS
   ========================================================= */

.tz-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.tz-field-full {
  grid-column: 1 / -1;
}

.tz-action-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.5rem;
  margin-bottom: 1.25rem;
}

.tz-btn-now {
  flex: 0 0 auto;
  min-width: 110px;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease, 0.2s ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.tz-btn-now:hover {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, var(--surface-2));
  color: var(--primary);
}

.tz-dest-add-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.tz-dest-add-group select {
  flex: 1;
}

.tz-add-btn {
  flex: 0 0 auto;
  padding: 0.75rem 1.25rem;
  white-space: nowrap;
}

.tz-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 12px);
  background: var(--surface-2);
  margin-bottom: 1rem;
}

.tz-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all var(--ease, 0.2s ease);
}

.tz-tag-remove {
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transition: all var(--ease, 0.2s ease);
}

.tz-tag-remove:hover {
  background: #e53e3e;
  color: #ffffff;
}

/* Results */
.tz-results-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.tz-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-radius: var(--radius-md, 12px);
  box-sizing: border-box;
  transition: all var(--ease, 0.2s ease);
}

.tz-result-card.is-origin {
  border-left-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, var(--surface-2));
}

.tz-result-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.tz-result-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: flex-start;
  text-align: left;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.tz-result-city {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tz-result-zone {
  font-size: 0.8rem;
  color: var(--text-3);
  margin: 0;
  padding: 0;
  line-height: 1.3;
}

.tz-origin-badge {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  padding: 2px 7px;
  border-radius: 4px;
}

.tz-result-time-group {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.tz-result-datetime {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.tz-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.tz-badge-same {
  background: rgba(72, 187, 120, 0.15);
  color: #276749;
}

.tz-badge-next {
  background: rgba(237, 137, 54, 0.18);
  color: #c05621;
}

.tz-badge-prev {
  background: rgba(66, 153, 225, 0.18);
  color: #2b6cb0;
}

/* Live Current Time Block */
.tz-live-section {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.tz-live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.tz-live-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-2);
}

.tz-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-3);
}

.tz-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #48bb78;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

.tz-live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.tz-live-card {
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.tz-live-city {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
}

.tz-live-time {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

/* Dark theme overrides */
[data-theme="dark"] .tz-badge-same {
  background: rgba(72, 187, 120, 0.22);
  color: #68d391;
}

[data-theme="dark"] .tz-badge-next {
  background: rgba(237, 137, 54, 0.25);
  color: #fbd38d;
}

[data-theme="dark"] .tz-badge-prev {
  background: rgba(66, 153, 225, 0.25);
  color: #90cdf4;
}

/* Responsive adjustments */
@media (max-width: 650px) {
  .tz-grid {
    grid-template-columns: 1fr;
  }

  .tz-action-row {
    flex-direction: column;
  }

  .tz-btn-now, .calculate-btn {
    width: 100%;
  }

  .tz-result-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .tz-result-time-group {
    text-align: left;
    align-items: flex-start;
  }

  .tz-dest-add-group {
    flex-direction: column;
  }

  .tz-add-btn {
    width: 100%;
  }

  .tz-live-grid {
    grid-template-columns: 1fr;
  }
}
