.chat-card {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  height: 80vh;
  max-height: 800px;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e5e9f2;
  display: flex;
  justify-content: space-between;
  align-items: center;

  h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
  }

  .clear-btn {
    background-color: transparent;
    color: #6c757d;
    border: 1px solid #dee2e6;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 4px;

    &:hover {
      background-color: #f8f9fa;
    }
  }
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #6c757d;
}

.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.messages-list {
  display: flex;
  flex-direction: column;
}

.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  position: relative;

  .message-content {
    margin-bottom: 6px;
  }

  .message-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
  }

  &.user {
    align-self: flex-end;
    background-color: #2c7be5;
    color: white;
    border-radius: 10px 10px 0 10px;

    .message-time {
      color: rgba(255, 255, 255, 0.8);
    }
  }

  &.assistant {
    align-self: flex-start;
    background-color: #f2f4f8;
    color: #333;
    border-radius: 10px 10px 10px 0;
  }

  &.loading {
    padding: 14px;

    .typing-indicator {
      display: flex;
      align-items: center;

      span {
        height: 10px;
        width: 10px;
        background-color: #6c757d;
        border-radius: 50%;
        display: inline-block;
        margin: 0 2px;
        opacity: 0.7;
        animation: typing 1.4s infinite both;

        &:nth-child(2) {
          animation-delay: 0.2s;
        }

        &:nth-child(3) {
          animation-delay: 0.4s;
        }
      }
    }
  }
}

.events-container {
  padding: 0 20px 10px;
  border-top: 1px solid #e5e9f2;

  h3 {
    font-size: 16px;
    margin: 16px 0 12px;
  }

  .events-list {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding-bottom: 10px;

    app-event-card {
      min-width: 280px;
      max-width: 280px;
    }
  }
}

.city-info-container {
  padding: 0 20px 10px;
  border-top: 1px solid #e5e9f2;
}

.input-container {
  display: flex;
  padding: 16px 20px;
  border-top: 1px solid #e5e9f2;

  input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 24px;
    font-size: 14px;

    &:focus {
      outline: none;
      border-color: #2c7be5;
    }

    &:disabled {
      background-color: #f8f9fa;
      cursor: not-allowed;
    }
  }

  button {
    margin-left: 10px;
    padding: 12px 20px;
    border-radius: 24px;
    background-color: #2c7be5;
    color: white;
    border: none;
    font-size: 14px;

    &:hover:not(:disabled) {
      background-color: #1a68d1;
    }

    &:disabled {
      background-color: #a3c8f8;
      cursor: not-allowed;
    }
  }
}

@keyframes typing {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}
