.hatost-chat-container {
  margin: 20px 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 600px;
}
.hatost-chat-header {
  background: linear-gradient(90deg,#308df7 24%,#305ff7);
  color: #fff;
  padding: 10px 10px;
  font-size: 1.2em;
  min-height: 50px;
  font-weight: bold;
  text-align: center;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hatost-chat-flow-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: bold;
}
.hatost-chat-flow-label {
  background-color: rgba(255, 255, 255, 1);
  color: #308df7;
  padding: 6px 12px;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 16px;
  font-weight: bold;
}
.hatost-chat-reset-button {
  background-color: rgba(255, 255, 255, 1);
  color: #308df7;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.3s;
  font-weight: bold;
}
.hatost-chat-reset-button:hover {
  opacity: 0.8;
}
.hatost-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.hatost-chat-message {
  display: flex;
  flex-direction: column;
  max-width: 75%;
  animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hatost-chat-message.user {
  align-self: flex-end;
  align-items: flex-end;
}
.hatost-chat-message.ai {
  align-self: flex-start;
  align-items: flex-start;
}
.hatost-chat-message-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  word-wrap: break-word;
  font-size: 1.4rem;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  white-space: pre-wrap;
}
.hatost-chat-message.user .hatost-chat-message-bubble {
  background-color: #308df7;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.hatost-chat-message.ai .hatost-chat-message-bubble {
  background-color: #fff;
  color: #333;
  border-bottom-left-radius: 4px;
  border: 1px solid #e0e0e0;
}
.hatost-chat-message-time {
  font-size: 0.75em;
  color: #999;
  margin-top: 4px;
  padding: 0 4px;
}
.hatost-chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 1em;
  text-align: center;
  padding: 40px 20px;
}
.hatost-chat-input-area {
  padding: 16px 20px;
  background-color: #fff;
  border-top: 1px solid #e0e0e0;
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.hatost-chat-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.hatost-chat-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 24px;
  font-size: 1.4rem;
  resize: none;
  outline: none;
  transition: border-color 0.3s;
  min-height: 48px;
  max-height: 120px;
  line-height: 1.5;
}
.hatost-chat-input:focus {
  border-color: #1976d2;
}
.hatost-chat-input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}
.hatost-chat-send-button {
  background-color: #308df7;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 12px 24px;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  flex-shrink: 0;
  min-width: 80px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hatost-chat-send-button:hover:not(:disabled) {
  background-color: #1565c0;
}
.hatost-chat-send-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}
.hatost-chat-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #999;
  font-size: 0.9em;
  padding: 8px 16px;
}
.hatost-chat-loading-dots {
  display: inline-flex;
  gap: 4px;
}
.hatost-chat-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #999;
  animation: bounce 1.4s infinite ease-in-out both;
}
.hatost-chat-loading-dot:nth-child(1) {
  animation-delay: -0.32s;
}
.hatost-chat-loading-dot:nth-child(2) {
  animation-delay: -0.16s;
}
@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}
.hatost-chat-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.hatost-chat-option-button {
  background-color: #fff;
  border: 2px solid #1976d2;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1.4rem;
  font-weight: bold;
  color: #1976d2;
  cursor: pointer;
  transition: all 0.3s;
  text-align: left;
  font-weight: 500;
}
.hatost-chat-option-button:hover {
  background-color: #e3f2fd;
  border-color: #1565c0;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.hatost-chat-option-button:active {
  transform: translateY(0);
}
/* @media (max-width: 768px) {
  .hatost-chat-container {
    height: 500px;
    margin: 10px;
  }
  .hatost-chat-message {
    max-width: 85%;
  }
  .hatost-chat-header {
    font-size: 1em;
    padding: 12px 16px;
  }
  .hatost-chat-flow-info {
    left: 12px;
    font-size: 0.75em;
    gap: 8px;
  }
  .hatost-chat-flow-label {
    padding: 4px 8px;
    font-size: 0.8em;
  }
  .hatost-chat-reset-button {
    right: 12px;
    padding: 4px 8px;
    font-size: 0.8em;
  }
  .hatost-chat-messages {
    padding: 16px;
  }
  .hatost-chat-input-area {
    padding: 12px 16px;
  }
  .hatost-chat-option-button {
    padding: 10px 14px;
    font-size: 0.9em;
  }
} */

/* はい/いいえボタン */
.hatost-chat-yesno-buttons {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
  padding: 8px 0;
}

.hatost-chat-yesno-button {
  flex: 1;
  padding: 12px 24px;
  border-width: 1px;
  border-style: solid;
  border-radius: 24px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  min-width: 100px;
}

.hatost-chat-method-buttons {
  display: flex;
  /* flex-direction: column; */
  gap: 10px;
  padding: 10px;
}

.hatost-chat-method-button {
  padding: 12px 20px;
  border: 2px solid #308df7;
  border-radius: 6px;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
  background-color: #fff;
  color: #308df7;
  text-align: left;
}

.hatost-chat-method-button:hover {
  background-color: #308df7;
  color: #fff;
}

.hatost-chat-yes-button {
  border-color: #308df7;
  background-color: #308df7;
  color: #fff;
}

.hatost-chat-yes-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hatost-chat-no-button {
  background-color: #ffffff;
  border-color: #308df7;
  color: #308df7;
}

.hatost-chat-no-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 時間入力UI */
.hatost-chat-time-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 12px 0;
}

.hatost-chat-time-label {
  font-size: 0.9em;
  color: #666;
  font-weight: 500;
}

.hatost-chat-time-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1em;
  outline: none;
  transition: border-color 0.3s;
}

.hatost-chat-time-input:focus {
  border-color: #1976d2;
}

.hatost-chat-time-submit-button {
  background-color: #1976d2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.hatost-chat-time-submit-button:hover {
  background-color: #1565c0;
}

/* チャット内カレンダー */
.hatost-chat-messages .hatost-chat-calendar-container {
  margin: 12px 0;
  max-width: 100%;
  width: 100%;
}

.hatost-chat-messages .hatost-chat-calendar {
  background-color: #fff !important;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.hatost-chat-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.hatost-chat-calendar-title {
  font-size: 1em;
  font-weight: bold;
  flex: 1;
  text-align: center;
}

.hatost-chat-calendar-nav {
  background-color: #1976d2;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.hatost-chat-calendar-nav:hover {
  background-color: #1565c0;
}

.hatost-chat-calendar-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hatost-chat-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.hatost-chat-calendar-weekday {
  text-align: center;
  font-size: 0.75em;
  font-weight: bold;
  color: #666;
  padding: 4px;
}

.hatost-chat-calendar-week {
  display: flex;
  /* grid-template-columns: repeat(7, 1fr); */
  gap: 2px;
}

.hatost-chat-calendar-day {
  aspect-ratio: 1;
  flex: 1;
  /* min-height: 32px; */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 4px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: #fff;
  cursor: default;
  position: relative;
}

.hatost-chat-calendar-day.selectable {
  cursor: pointer;
  transition: all 0.2s;
}

.hatost-chat-calendar-day.selectable:hover {
  background-color: #e3f2fd;
  border-color: #1976d2;
  transform: scale(1.05);
}

.hatost-chat-calendar-day.other-month {
  background-color: #f9f9f9;
  color: #ccc;
}

.hatost-chat-calendar-day.past-date {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

.hatost-chat-calendar-day.past-date.selectable {
  cursor: not-allowed;
}

.hatost-chat-calendar-day.past-date.selectable:hover {
  background-color: #f5f5f5;
  border-color: #e0e0e0;
  transform: none;
}

.hatost-chat-calendar-day.today {
  background-color: #e3f2fd;
  font-weight: bold;
}

.hatost-chat-calendar-day.weekend {
  background-color: #fff9f9;
}

.hatost-chat-calendar-day.future-limit {
  background-color: #f5f5f5;
  color: #ccc;
  cursor: not-allowed;
}

.hatost-chat-calendar-day.future-limit .hatost-chat-calendar-day-number {
  color: #ccc;
}

.hatost-chat-calendar-day.disabled {
  background-color: #f5f5f5;
  color: #ccc;
  cursor: not-allowed;
  opacity: 0.5;
}
.hatost-chat-calendar-day.disabled .hatost-chat-calendar-day-number {
  color: #ccc;
}
.hatost-chat-calendar-day.weekend.disabled {
  background-color: #f9f9f9;
  color: #ddd;
}
.hatost-chat-calendar-day.weekend.disabled .hatost-chat-calendar-day-number {
  color: #ddd;
}

.hatost-chat-calendar-day.selected-date1,
.hatost-chat-calendar-day.selected-date2 {
  border: 2px solid #1976d2;
  pointer-events: none;
  cursor: default;
}

.hatost-chat-calendar-day.selected-date1.selectable,
.hatost-chat-calendar-day.selected-date2.selectable {
  cursor: default;
}

.hatost-chat-calendar-day.selected-date1.selectable:hover,
.hatost-chat-calendar-day.selected-date2.selectable:hover {
  background-color: #fff;
  transform: none;
}

.hatost-chat-calendar-day-number {
  font-size: 0.85em;
  font-weight: normal;
  color: #333;
}

.hatost-chat-calendar-day.today .hatost-chat-calendar-day-number {
  color: #1976d2;
  background-color: #1976d2;
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  font-weight: bold;
}


.hatost-chat-calendar-event {
  font-size: 0.65em;
  padding: 2px 4px;
  margin-top: 2px;
  background-color: #4caf50;
  color: #fff;
  border-radius: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  text-align: center;
  line-height: 1.2;
}

.hatost-chat-calendar-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
  padding: 8px;
  font-size: 0.75em;
  color: #666;
}

.hatost-chat-calendar-legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: #4caf50;
  border-radius: 50%;
  flex-shrink: 0;
}

.hatost-chat-calendar-legend-text {
  line-height: 1.2;
}

@media (max-width: 768px) {
  .hatost-chat-calendar {
    padding: 8px;
  }
  
  .hatost-chat-calendar-day {
    min-height: 28px;
    padding: 2px;
  }
  
  .hatost-chat-calendar-day-number {
    font-size: 0.75em;
  }
  
  .hatost-chat-calendar-nav {
    min-width: 32px;
    height: 32px;
    font-size: 1em;
    padding: 2px 8px;
  }
}

