/* Google Timeline Tool styles */

#timeline-tool-root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  color: #333;
  line-height: 1.5;
  font-size: 14px;
}

/* ── Notice ─────────────────────────────────────────────────────────────────── */

#tlt-notice {
  background: #e8f4fd;
  border-left: 4px solid #2196F3;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 0 4px 4px 0;
}

#tlt-notice p {
  margin: 0;
  color: #1565C0;
  font-size: 13px;
}

/* ── Upload ──────────────────────────────────────────────────────────────────── */

#tlt-upload-area {
  margin-bottom: 20px;
}

.tlt-upload-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #2196F3;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}

.tlt-upload-btn:hover {
  background: #1976D2;
}

#tlt-file-input {
  display: none;
}

#tlt-upload-status {
  margin-top: 8px;
  font-size: 13px;
  color: #555;
}

#tlt-upload-status.tlt-error {
  color: #d32f2f;
  font-weight: 600;
}

/* ── Month selector ──────────────────────────────────────────────────────────── */

#tlt-month-selector {
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

#tlt-month-selector p {
  margin: 0;
  font-weight: 600;
}

#tlt-month-select {
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

#tlt-analyze-btn {
  padding: 8px 18px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s;
}

#tlt-analyze-btn:hover {
  background: #388E3C;
}

/* ── Tabs ────────────────────────────────────────────────────────────────────── */

#tlt-tabs {
  display: flex;
  border-bottom: 2px solid #ddd;
  margin-bottom: 20px;
  gap: 0;
}

.tlt-tab {
  padding: 10px 22px;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #777;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.tlt-tab:hover {
  color: #2196F3;
}

.tlt-tab.active {
  color: #2196F3;
  border-bottom-color: #2196F3;
}

.tlt-tab-content {
  display: none;
}

.tlt-tab-content.active {
  display: block;
}

/* ── Tab header / toolbar ────────────────────────────────────────────────────── */

.tlt-tab-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tlt-tab-header .tlt-help {
  margin: 4px 0 0;
  flex-basis: 100%;
  font-size: 12px;
  color: #888;
}

.tlt-tab-header button {
  padding: 7px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s;
}

.tlt-tab-header button:hover {
  background: #f5f5f5;
}

.tlt-primary-btn {
  background: #2196F3 !important;
  color: #fff !important;
  border-color: #2196F3 !important;
}

.tlt-primary-btn:hover {
  background: #1976D2 !important;
}

/* ── Table ───────────────────────────────────────────────────────────────────── */

.tlt-table-scroll {
  overflow-x: auto;
}

.tlt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tlt-table th,
.tlt-table td {
  padding: 7px 10px;
  border: 1px solid #e0e0e0;
  text-align: left;
  white-space: nowrap;
}

.tlt-table th {
  background: #f5f5f5;
  font-weight: 700;
}

.tlt-table tbody tr:hover {
  background: #fafafa;
}

/* ── My Maps table ───────────────────────────────────────────────────────────── */

.tlt-geocode-notice {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
}

.tlt-geocode-notice button {
  padding: 6px 14px;
  background: #FF9800;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s;
}

.tlt-geocode-notice button:hover {
  background: #F57C00;
}

.tlt-geocode-notice button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#tlt-geocode-progress {
  font-size: 13px;
  color: #555;
}

.tlt-geocode-warn {
  margin: 0;
  flex-basis: 100%;
  font-size: 11px;
  color: #888;
}

.tlt-empty {
  color: #888;
  font-style: italic;
}

/* ── Analysis ────────────────────────────────────────────────────────────────── */

.tlt-analysis-controls {
  margin-bottom: 16px;
}

.tlt-analysis-controls label {
  margin-right: 20px;
  cursor: pointer;
  font-weight: 600;
}

.tlt-chart-container {
  max-width: 900px;
  margin-bottom: 24px;
}

.tlt-analysis-table td {
  text-align: right;
}

.tlt-analysis-table td:first-child {
  text-align: left;
  font-weight: 600;
}

.tlt-day-row {
  cursor: pointer;
}

.tlt-day-row:hover {
  background: #e3f2fd !important;
}

/* ── Day detail panel ────────────────────────────────────────────────────────── */

#tlt-day-detail {
  margin-bottom: 24px;
  padding: 16px;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.tlt-day-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tlt-day-detail-header strong {
  font-size: 15px;
}

#tlt-day-close {
  padding: 4px 12px;
  background: #757575;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

#tlt-day-close:hover {
  background: #616161;
}
