/* 
 * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.
 * See LICENSE in the project root for license information.
 */

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f7f7f9;
  color: #1a1a1a;
}

.hai-body {
  padding: 0;
}

.hai-shell {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hai-header {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hai-shell.hidden,
.view.hidden,
.hidden {
  display: none;
}

.hai-header h1 {
  margin: 0;
  font-size: 20px;
}

.hai-header p {
  margin: 0;
  color: #4b4b4b;
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card h2 {
  margin-top: 0;
}

form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #4b4b4b;
}

input {
  margin-top: 4px;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #c7c7c7;
  font-size: 14px;
}

button {
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  background: #005bd1;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button.ghost {
  background: transparent;
  border: 1px solid #c7c7c7;
  color: #1a1a1a;
}

button:disabled {
  opacity: 0.6;
  cursor: progress;
}

.session-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.attendees {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 140px;
  overflow-y: auto;
}

.attendees li {
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}

.attendees li:last-child {
  border-bottom: none;
}

.attendee-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 4px;
  background: #f7f7f9;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.attendee-name {
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 120px;
}

.attendee-email {
  color: #6b6b6b;
  font-size: 12px;
  flex: 1 1 auto;
  min-width: 150px;
}

.resolution-badge {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.resolution-provider_connection {
  background: #d4edda;
  color: #155724;
}

.resolution-user_profile,
.resolution-external_calendar {
  background: #fff3cd;
  color: #856404;
}

.resolution-none {
  background: #f8d7da;
  color: #721c24;
}

.icon-btn {
  padding: 4px 8px;
  min-width: auto;
  font-size: 18px;
  line-height: 1;
}

.attendee-add {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.attendee-input {
  flex: 1;
  margin-top: 0;
}

.muted {
  color: #6c6c6c;
  margin: 0;
}

.actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.error {
  color: #b00020;
}

#results-json {
  max-height: 200px;
  overflow-y: auto;
  background: #0f172a;
  color: #f1f5f9;
  padding: 12px;
  border-radius: 6px;
  font-size: 12px;
}

.sideload {
  padding: 24px;
  text-align: center;
}

.otp-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.otp-status {
  margin: 0;
  font-size: 13px;
  color: #0b7a0b;
}

.summary-line {
  font-size: 16px;
  margin: 12px 0;
  padding: 12px;
  background: #e3f2fd;
  border-radius: 4px;
  border-left: 4px solid #005bd1;
}

.booking-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.booking-section button {
  align-self: flex-start;
}

.collapsible-section {
  margin: 12px 0;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f7f7f9;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
}

.section-header:hover {
  background: #eeeeee;
}

.toggle-icon {
  color: #6b6b6b;
  font-size: 12px;
}

.section-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

textarea {
  margin-top: 4px;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #c7c7c7;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}

input[type="checkbox"] {
  width: auto;
  margin-right: 8px;
  margin-top: 0;
}

input[type="number"] {
  width: 100px;
}

.timeline-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  background: #f7f7f9;
  border-radius: 4px;
}

.timeline-controls-row.top-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.timeline-controls-row.top-row .timeline-date {
  font-weight: 600;
  flex: 1;
  text-align: center;
}

.timeline-controls-row.middle-row,
.timeline-controls-row.bottom-row {
  width: 100%;
  display: flex;
  justify-content: center;
}

.timeline-scale-select {
  padding: 6px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: white;
  font-size: 12px;
  cursor: pointer;
  margin: 4px 0 0 0;
  max-width: 180px;
}

.attendee-view-select {
  padding: 6px 10px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: white;
  font-size: 12px;
  cursor: pointer;
  margin: 4px 0 0 0;
  max-width: 220px;
}

.timeline-grid {
  overflow-x: auto;
  max-height: 600px;
  overflow-y: auto;
}

.timeline-header {
  display: flex;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
  border-bottom: 2px solid #e0e0e0;
  font-weight: 600;
  font-size: 13px;
}

.timeline-row {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
}

.timeline-row-label {
  min-width: 80px;
  max-width: 80px;
  padding: 8px;
  border-right: 1px solid #e0e0e0;
  background: #f7f7f9;
  font-size: 12px;
  display: flex;
  align-items: center;
  position: sticky;
  left: 0;
  z-index: 5;
}

.timeline-col-header {
  min-width: 100px;
  flex: 1;
  padding: 8px;
  border-right: 1px solid #e0e0e0;
  text-align: center;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-cell {
  min-width: 100px;
  flex: 1;
  padding: 8px;
  border-right: 1px solid #e0e0e0;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
}

.timeline-free {
  background: transparent;
  border: 1px dotted #9fd3b8;
  color: #2e6b4f;
}

.timeline-easy {
  background: #c8e6c9;
  color: #1b5e20;
}

.timeline-medium {
  background: #fff9c4;
  color: #f57f17;
}

.timeline-hard {
  background: #ffcdd2;
  color: #c62828;
}

.timeline-recommended {
  outline: 3px solid #0078d4;
  outline-offset: -3px;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 8px rgba(0, 120, 212, 0.3);
}

.timeline-recommended::after {
  content: "★";
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 10px;
  color: #0078d4;
}

.timeline-selected {
  background: rgba(0, 120, 212, 0.15) !important;
  outline: 2px solid #0078d4;
  outline-offset: -2px;
  z-index: 3;
}

.timeline-cell:hover {
  opacity: 0.8;
}

.timeline-grid {
  user-select: none;
}
.hidden {
  display: none;
}