* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

.container { display: flex; height: 100vh; }

#day-selector {
  width: 120px;
  padding: 15px 10px;
  overflow-y: auto;
  background: #2c3e50;
  border-right: 1px solid #1a252f;
}

#day-selector h1 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  text-align: center;
  color: white;
}

#day-detail {
  width: 350px;
  padding: 20px;
  overflow-y: auto;
  background: #f8f9fa;
  border-right: 1px solid #dee2e6;
}

#map { flex: 1; height: 100%; }

h1 { font-size: 1.4rem; margin-bottom: 8px; }
h2 { font-size: 1.2rem; margin-bottom: 8px; }
.subtitle { color: #666; font-size: 0.9rem; margin-bottom: 20px; }

#day-detail-header {
  margin-bottom: 15px;
}

.stop {
  background: white;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: box-shadow 0.2s;
}
.stop:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }

.stop-header { display: flex; align-items: center; gap: 12px; }
.stop-number {
  background: #4285f4;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.stop-name { font-weight: 600; }
.stop-address { color: #666; font-size: 0.85rem; margin-top: 4px; margin-left: 40px; }
.stop-notes { color: #888; font-size: 0.8rem; margin-top: 4px; margin-left: 40px; font-style: italic; }

.travel-time {
  text-align: center;
  color: #888;
  font-size: 0.8rem;
  padding: 4px 0;
}

.config {
  background: #fff3cd;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}
.config code {
  background: #ffeaa7;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.error {
  background: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.total-time {
  background: #d4edda;
  padding: 12px;
  border-radius: 8px;
  margin-top: 20px;
  text-align: center;
}

.day-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.day-tab {
  padding: 10px 8px;
  border-radius: 6px;
  background: #34495e;
  border: 2px solid #34495e;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  text-align: center;
  color: #ecf0f1;
  font-size: 0.9rem;
}
.day-tab:hover {
  background: #4a5f7f;
  border-color: #4a5f7f;
}
.day-tab.active {
  background: #4285f4;
  color: white;
  border-color: #4285f4;
}

.day-header {
  background: #4285f4;
  color: white;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 12px;
  margin-top: 8px;
}

.event-time {
  color: #4285f4;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.event-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.event-details {
  color: #666;
  font-size: 0.85rem;
  margin-top: 4px;
}

.event-youtube {
  color: #888;
  font-size: 0.8rem;
  margin-top: 4px;
}

.event-youtube::before {
  content: "🎥 ";
}

.event-youtube a {
  color: #c4302b;
  text-decoration: none;
  font-style: italic;
}

.event-youtube a:hover {
  text-decoration: underline;
}

.event-item {
  background: white;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.event-item.has-address {
  cursor: pointer;
  transition: box-shadow 0.2s;
  border-left: 3px solid #4285f4;
}

.event-item.has-address:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.event-item.note-only {
  background: #f8f9fa;
  border-left: 3px solid #dee2e6;
}

.event-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e0e0e0;
}

.event-actions button {
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  transition: opacity 0.2s;
}

.event-actions button:hover {
  opacity: 0.8;
}

.btn-edit {
  background: #4285f4;
  color: white;
}

.btn-delete {
  background: #ea4335;
  color: white;
}

.btn-save {
  background: #34a853;
  color: white;
}

.btn-cancel {
  background: #999;
  color: white;
}

.edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.edit-form input,
.edit-form textarea {
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: inherit;
}

.edit-form textarea {
  min-height: 60px;
  resize: vertical;
}

.edit-form label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #666;
  margin-bottom: -4px;
}

.insert-stop-btn {
  text-align: center;
  padding: 8px;
  color: #4285f4;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.2s;
}

.insert-stop-btn:hover {
  background: #f0f7ff;
}

[draggable="true"] {
  cursor: move;
}

.drag-over {
  border-top: 3px solid #4285f4 !important;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 24px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  color: #333;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
}

.form-group small {
  display: block;
  margin-top: 4px;
  color: #666;
  font-size: 0.8rem;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
